Where should I store application settings for all non-roaming users?

I have a WPF application that should run for all users of the machine with the same settings. Settings must be read / written. I previously saved user configuration settings in CommonApplicationData, e.g.

var settingsFile = Path.Combine(Environment.GetFolderPath(
  Environment.SpecialFolder.CommonApplicationData),
    "[company]", "[product]", "settings.xml");

However, this morning I read what is CommonApplicationDataused for roaming profiles, which means that they are not specific machines. From what I can find, we have the following parameters for the 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 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 parameters

  • Single user roaming
  • All users roaming
  • Single user, not roaming

, . , , ?

?

+5
2

appdata , .

MSDN:

CommonApplicationData - ", , "

LocalApplicationData - ", , , , ".

+2

- , .

+1

All Articles