foreach (Environment.SpecialFolder folder in Enum.GetValues(typeof(Environment.SpecialFolder)))
{
string path = Environment.GetFolderPath(folder);
Console.WriteLine("{0}\t==>\t{1}", folder, path);
}
In
general, you should put your application’s data in the
LocalApplicationData (nonroaming) or ApplicationData (roaming) folder.
That is what these folders are meant for. Examine them on your own
computer to see how other software uses them. You should never write
program data to ProgramFiles or anywhere file security is an issue. The
ApplicationData directory will be replicated on all computers to which
the user logs on in a domain, so avoid putting unnecessary data there.
Starting with Windows Vista, the operating system enforces file
security much more strongly, and an application that doesn’t pay
attention to security issues can break.