Hi,
Can you change the path of the file written by the Settings class I want it in the app folder rather than "Local Settings\App Data\appname_132\user.config".
Thanks,
Weiran.
Hi,
Can you change the path of the file written by the Settings class I want it in the app folder rather than "Local Settings\App Data\appname_132\user.config".
Thanks,
Weiran.
Change Settings file path
Pete R
The LocalSettingsProvider does not provide a way to change this path... if you absolutely require doing so you may want to look into making your own SettingsProvider that offers this functionality.
That being said I would highly suggest NOT changing the path of the user settings file to the app directory for two key reasons:
#1) When your app is run in low rights environments (ie the user not having Administrator access) they would likely not have write permission to your app directory and would not be able to save their settings, something they can do when it is written within their own user profile.
#2) Keeps individual user settings separate. System/Application wide settings should be set in the configuration file that sits next to your application and just leave individual user settings to be stored within their user profile so that they remain unique between users but also to offer the possibility to prevent unauthorized users from getting access to other user’s settings.