hi, my app stores some settings data in the user.config file. this one is located in
InstallRoot%\Documents and Settings\username\Local Settings or appdata.
How can i modify this location of the user.config file (for example i want it always to be in the same dir of my app or a subdir of it.
Havent been able to figure it out , anyone knows
thanks,
Bruno

user.config location
Lan Nguyen
Please note that it is *not* recommended to store user settings in the application directory.
"Normal" users should not have write access to this directory, so you will run into problems when someone tries to run your application as a non-administrator.
Best regards,
Johan Stenberg
Pazout
http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnsetup/html/migrationbkm09.asp
This may help clear things up for you. I would assume you would need to write your own migration tools.
-Joe
Eric Falsken
Thank you for your answer. I do agree with you on this partially. Normal users in a corporate environment Yes but waht about all the Home users to which some of my software is targeted I have a problem :
None of these users will ever find that user.config file back (its so well hidden in the C:\documents and settings\....), what if i want a user to be able to move his settings and all config options I stored in this file to a new computer for example Or to just make a simple backup Write tools to do this , is that the recommended action
thanks,
Bruno
SharathMum
sayhi1982
The LocalFileSettingsProvider actually uses the configuration system to figure out where the file is to be located (the exact location depends on factors such as if the application is click-once deployed or not) so no, this is not easily done.
Best regards,
Johan Stenberg
Idanle
The end result that I want is that most things would behave the same as if I was using LocalFileSettingsProvider except that the location of the user.config file is different.
But how do I ensure this Basically, I have no idea what LocalFileSettingsProvider is doing. Java provides the source code for it's libraries -- does .Net do the same Can I look at the source code for LocalFileSettingsProvider to see what it is doing
I personally would rather just let .Net handle the location and management of the config files but my workplace has this standard of placing user config files on a certain networked drive. But I really want to use .Net's application/user settings framework -- it's really nice and saves me a lot of work! If only I could easily change the location of the user.config file.
My hope was to quickly be able to use .Net's application/user settings framework (with the modification that it uses the networked drive to store user.config) to do my current project and then later try to convince my project leaders that it might make more sense to just go along with the default .Net behavior for the location of the user.config files.