tags:

views:

96

answers:

2

Hi,
we have a bunch of application which rely on configuration files; these files nowadwys reside in the same folder of the application, so (e.g.)

C:\Program Files\OurCompany\OurApplication

I understand this is the wrong folder where to store config files; where should we store these files:
- allowing end users to change their configurations
- being compliant with MS guidelines
- being consistent between the various versions of Windows from Xp up to Windows7
- being indipendent from end user language
These applications are mostly written in .NET (1.1 and 2.0), some in C++, some in VB6: so any reference to an API, a constant or anything related to these environment will be greatly appreciated.
Thanks in advance to anyone who will help.


EDIT:
I'm editing this for future reference for anyone who will eventually fall here: Pavel point is a very good point to think of; it is not applicable in our case since we have a mix of .NET, C++ and VB6 applications, but is a very good point indeed. After Glen's suggestion, I have found these links which could be useful: User Data and Settings Management
Data and Settings Management
Step-by-Step Guide to User Data and User Settings
User Data & Settings (Intelliem Community) Client Settings FAQ

+2  A: 

This page gives a good tutorial on user profiles and where to store per-user settings

It includes instructions on how to use the Registry to locate the User Profile, as well as a list of the directories that live under "%Systemdrive%\Documents and Settings"

An explanation is given for each folder and recommendations for what data to put where.

Other things of interest are local and roaming profiles.

Glen
Thanks Glen: it's almost what I was looking for. By chance, do you also know how to access these folders in .NET and/or C++ and/or VB6?
Turro
+2  A: 

You can use isolated storage to achieve per-user configuration.

Pavel Nikolov
Thanks Pavel! Isolated storage is a very good choice; unfortunately though, _in_our_case_, seems to have two major drawbacks: 1) is applicable only to .NET applications and not to C++ and VB6 ones; 2) due to his nature, files in isolated storage are not easy to find in case one wants to manually edit or replace a config file (sometimes we have to, sadly). Still, it remains a very good point, I will keep in mind in future and I upvoted it anyway.
Turro