Retrieving System Directory Info

Iv'e just spent the last hour or so looking around for how I can get the path of a system directory inside windows, for example the Start Menu folder.

After seeing many different methods of getting the path I'm sure I'd seen something in the framework that would do this for me and yes there is, so for everyone who doesn't know you can use the:

System.Environment.GetFolderPath(SpecialFolderEnum folder).

Very handy, my only question now is how I can get the path for All Users and not just the user who is logged on. ohh well best keep looking.

After browing for a little longer to get the path of the All Users Profile in windows use :

System.Environment.GetEnvironmentVariable("ALLUSERSPROFILE")

No Comments