Click to See Complete Forum and Search --> : Get System Directory [URGENT]
usamaalam
Jan 24th, 2005, 01:39 PM
Hi all,
I need to get the system of directory with the help of C#, means if windows is installed in C Drive in windows folder, then I need to get c:\windows and so on.
Thanks.
dynamic_sysop
Jan 24th, 2005, 02:02 PM
like this ...
string system32 = Environment.GetFolderPath(Environment.SpecialFolder.System);
Console.WriteLine("the System32 folder is located at :- " + system32);
string windows = system32.Substring(0 , system32.LastIndexOf(@"\"));
Console.WriteLine("the Windows folder is located at :- " + windows);
usamaalam
Jan 24th, 2005, 02:09 PM
Thank you very much for your quick reply. I dont have VS .NET this time, tomorrow I will check it in office.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.