Using this:
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
I get this output:
"C:\\Documents and Settings\\[USER]\\Application Data"
How can I get the root directory of all users? i.e.:
"C:\\Documents and Settings\\[USER]\\"
Try:
System.Environment.GetEnvironmentVariable("USERPROFILE");
Edit:
If the version of .NET you are using is 4 or above, you can use the Environment.SpecialFolder
enumeration:
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);