Where are user settings persisted?

T

Terry

I am using the My.Settings object to save user settings. During testing, I
want to 'zero' out what has been saved to start with the defaults again.
Where doies the framwork actually persist these user settings?

TIA,
 
B

Bill McCarthy

Hi Terry,

Terry said:
I am using the My.Settings object to save user settings. During testing, I
want to 'zero' out what has been saved to start with the defaults again.
Where doies the framwork actually persist these user settings?

See:
http://msdn.microsoft.com/en-us/library/8eyb2ct1(VS.85).aspx

<quote>
Settings File Locations
The location of the app.exe.config and user.config files will differ based
on how the application is installed. For a Windows Forms-based application
copied onto the local computer, app.exe.config will reside in the same
directory as the base directory of the application's main executable file,
and user.config will reside in the location specified by the
System.Windows.Forms.Application.LocalUserAppDataPath property. For an
application installed by means of ClickOnce, both of these files will reside
in the ClickOnce Data Directory underneath %InstallRoot%\Documents and
Settings\username\Local Settings.

The storage location of these files is slightly different if a user has
enabled roaming profiles, which enables a user to define different Windows
and application settings when he or she is using other computers within a
domain. In that case, both ClickOnce applications and non-ClickOnce
applications will have their app.exe.config and user.config files stored
under %InstallRoot%\Documents and Settings\username\Application Data.

For more information about how the Application Settings feature works with
the new deployment technology, see ClickOnce and Application Settings. For
more information about the ClickOnce Data Directory, see Accessing Local and
Remote Data in ClickOnce Applications.

</quote>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top