I have a WPF application that must run for all users of a machine with the same settings. The settings must be read/write. I have previously been storing user configuration settings in CommonApplicationData, for example
var settingsFile = Path.Combine(Environment.GetFolderPath(
Environment.SpecialFolder.CommonApplicationData),
"[company]", "[product]", "settings.xml");
However I read this morning that CommonApplicationData
is used for roaming profiles, meaning they are not machine specific. From what I can find, we have the following options for application data (source):
// Store application-specific data for the current roaming user.
// A roaming user works on more than one computer on a network.
// A roaming user's profile is kept on a server on the network and is loaded onto a system ' when the user logs on.
System.Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
// Store in-common application-specific data that is used by all users.
System.Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData);
// Store application-specific data that is used by the current, non-roaming user.
System.Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
To summarize, the options are
- Single user, roaming
- All users, roaming
- Single user, non-roaming
What I need is all users, non-roaming. My initial thought is to chuck it all into the install folder, but that seems a little old-school?
Thoughts?
CommonApplicationData
is roaming? I find it a bit strange... – Deangelis