I need to read and write files that contain application specific data, shared between all the users.
I tried to use Environment.GetFolderPath(Environment.Speci
I think CommonApplicationData is exactly what you're looking for, as it's the global folder for all applications which are not bound to a user.
var commonpath = GetFolderPath(SpecialFolder.CommonApplicationData);
var path = Path.Combine(commonpath, "YourAppName\\YourApp.exe");
try {
Process.Start(path);
// or put data there or whatever
}
catch (Exception ex)
{
MessageBox.Show(path);
}
There's also SpecialFolder.LocalApplicationData for user-bound data.