I was having an interesting conversation with a bunch of you in the
donationcoder IRC Channel today and I wanted to post this here for more open debate.
What is the best way to store user settings? With the advent of Windows vista, microsoft is pushing users and developers to move from the age old idea of storing settings in the program's program files folder, to storing them under the individual users profile. With portable applications becoming popular, is this the best idea?
I think it is. The sheer idea that a program should require access to write to its program folder after install, to me, doesnt make sense. Once installed, unless running as an administrator, each application should store is own settings in the users data folder thus to allow for customization on a per user basis, and to help prevent infection should one user install something that turns out to be malware.
On the other hand, portability has become hugely popular. For most applications the need for portability really doesnt exist. I mean, most computers we use have certain applications that only make sense to run from your local PC. However, certain applications are nice to have and use on the go (browsers, word processors, web editors, etc). But, this also leads to a security risk as any user can take and plugin their thumb drive and load any application thus bypassying the security setup by any systems administrator.
One idea I think should be done is that each application should give the user the option of making the application portable via an ini file which stores the settings for the application so it can be read from disk vice the registry. I've seen several apps allow users to select, on install or through the options dialog, what mode the application is to be installed (portable or fixed). This is one idea.
What are your thoughts security-wise, portability-wise, etc