How can I retrieve the window directory in C#???

  • Thread starter Thread starter Hans
  • Start date Start date
Hi.

I use the following to retrieve the windows directory:
Directory.GetParent(Environment.SystemDirectory).ToString()

-Neil
 
Can anybody tell me how I can get the windows directory
in C#?

Tanx, Hans

string winDir =
Environment.GetFolderPath(Environment.SpecialFolder.System)

That will retrieve the system folder path - ex. C:\Windows\System32..
Is that what your after?
 
Back
Top