Where to save application configuration

we have a bunch of applications that depend on configuration files; these nowadwys files are in the same application folder, therefore (for example)

C:\Program Files\OurCompany\OurApplication 

I understand that this is the wrong folder for storing configuration files; where should we store these files:
- allows end users to change their configurations
- compliance with MS recommendations

- compatibility between different versions of Windows from Xp to Windows7
- be independent of the end user

These applications are mostly written in .NET (1.1 and 2.0), some in C ++, some in VB6: therefore, any reference to an API, constant, or anything related to this environment will be evaluated. Thanks in advance to everyone who helps.


EDIT:
I am editing this for a future reference for those who end up here: Paul's point is a very good moment to think about; this is not applicable in our case, since we have a mixture of .NET, C ++ and VB6 applications, but this is really a very good point. Following Glen’s suggestion, I found these links that may be useful: Managing user data and settings
Data and settings management
Walkthrough on user data and user settings
User Data and Settings (Intelliem Community) Client Settings Frequently Asked Questions

+4
source share
3 answers

This page gives a good guide on user profiles and where to store settings for each user.

It contains instructions on how to use the registry to search for a user profile, as well as a list of directories located in the "% Systemdrive% \ Documents and Settings" section

For each folder, explanations and recommendations on the placement of data are given.

Other interesting objects are local and roaming profiles.

+2
source

You can use isolated storage to achieve configuration for each user.

+3
source

I was looking for some information and came across this topic. I know this has been a long time, but just in case, you can also take a look at: System.Configuration

0
source

Source: https://habr.com/ru/post/1286012/


All Articles