Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How do I use Envirnment.GetEnvironmentVariable("SystemRoot") in a C# program?
Posted
Updated 14-Dec-10 0:31am
v2
Comments
senguptaamlan 14-Dec-10 6:40am    
whats the problem of using that piece of code ? Actually I'm not getting whats wrong ....are you facing any error ?

1 solution

You can try like bellow.
C#
String strTemp = Environment.GetEnvironmentVariable("SYSTEMROOT"); 


Thanks,
Mamun
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900