In C#, how do I get the name of the drive that the Operating System is installed on?
+14
A:
This should do it for you:
Path.GetPathRoot(Environment.SystemDirectory)
TheSoftwareJedi
2008-10-14 05:11:35
Yep, about as simple as it gets!
Matt Hanson
2008-10-14 05:15:34
+1
A:
All other Environment properties can be found at ms itself : http://msdn.microsoft.com/en-us/library/system.environment_properties.aspx
SystemDirectory - Gets the fully qualified path of the system directory.
JimmyTudeski
2008-10-14 06:05:29