Sunday, December 26, 2004

Storing user preference for application.

Often, your application allow user to set certain option that control the behavior of your application. If you do so, remember NOT to save this setting under the application installed folder.

There are 2 consequence if you do so.

First, you can only have one setting for all users. Individual user cannot have their specific config.

Second, if the application is under \program files\, non admin user will not be able to write to this folder, thus cannot save the setting.

Instead, write to the application data folder. Each user in your Windows have their own app data folder. Use the Environment.GetFolderPath() to get the user's application data folder.

Labels: ,


Post a Comment

<< Home