views:

120

answers:

3

Where should I store preferences and setting if my goal is that my app should be runnable from a network share and the user's settings should persist regardless of the exact machine he is logged in on at the time?

Similarly, where should I store application wide settings?

The development environment in use is not .Net but can compile apps compatable with Windows 2000 or later, if that is relevant.

A: 

The users profile. Assuming that her profile is roaming, the settings will follow the user wherever she is logging in.

For applications, settings should be stored in the Application Data special folder. You can get the path to this folder using SHGetSpecialFolderPath. For more info on special folders take a look at this article on Wikipedia.

When you say "application wide settings" I assume you mean settings available to all users. These could be stored alongside the application on the network share.

Peter Lillevold
Where is the user's profile in this context?
Bryan Dunphy
I'm talking about the logged on user profile, stored on each local machine.
Peter Lillevold
A: 

It seems to me that If "the user's settings should persist regardless of the exact machine he is logged in" the only place where you can store the settings is "on the server".

Exactly how this implemented is another story. If the share is writable then storing the config in file(s) on the same path/folder as the application is the easiest way. If the share is not writable you will have to find another way to do it - like a simple http web application.

jcinacio
A: 

Maybe Isolated Storage is what you are looking for (in case of per-user settings / files)

thijs
Isolated Storage is a bit out of the question here since he's not using .Net.
Peter Lillevold
Darn, I mis-read the question..
thijs