473,385 Members | 1,548 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Problems with Properties.Settings.Default and and user.config

Is it possible to decide where user.config is stored by
Properties.Settings.Default.Save?
The default location seems to be "C:\Documents and
Settings\[User]\Local settings\Application Data\[AppName]\[Executable
name_Url_some random key]\[Version number]" and there are several
reasons why I want to change that:

1. I have noticed that the "some random key" part of the path name
changed during the development of my application and then the settings
were lost.
2. I would prefer that the application version number was not part of
the path, because then every time a user upgrades to a new version then
all of his old settings are lost.
3. I would like to be able to rename the application executable and
still reference the same user.config
4. In a screen saver under Windows Vista (RC1) it seems that the
user.config that is used when the screen saver is configured and
previewed is not the same as the use used when it starts after the
computer has been idle for some time. Actually this happened with the
screen saver that was included as an example with Visual C# Express 2005

Dec 16 '06 #1
1 6436
Although I haven't done it personally you could write your own settingsprovider.
http://msdn2.microsoft.com/en-us/lib...sprovider.aspx to get you started.

--
....Carl Frisk
Anger is a brief madness.
- Horace, 20 B.C.
http://www.carlfrisk.com
"logicnet.dk" <lo*********@gmail.comwrote in message news:11*********************@t46g2000cwa.googlegro ups.com...
Is it possible to decide where user.config is stored by
Properties.Settings.Default.Save?
The default location seems to be "C:\Documents and
Settings\[User]\Local settings\Application Data\[AppName]\[Executable
name_Url_some random key]\[Version number]" and there are several
reasons why I want to change that:

1. I have noticed that the "some random key" part of the path name
changed during the development of my application and then the settings
were lost.
2. I would prefer that the application version number was not part of
the path, because then every time a user upgrades to a new version then
all of his old settings are lost.
3. I would like to be able to rename the application executable and
still reference the same user.config
4. In a screen saver under Windows Vista (RC1) it seems that the
user.config that is used when the screen saver is configured and
previewed is not the same as the use used when it starts after the
computer has been idle for some time. Actually this happened with the
screen saver that was included as an example with Visual C# Express 2005
Dec 17 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Bit Twiddler | last post by:
Hi, I have a windows form app which would benefit from the new application settings support in VS2005. Say that my form has a single textbox on it. When the form closes I would like to save...
0
by: dfererer | last post by:
Published application's user scope Properties.Settings.Default file can be found in every users's Documents and settings,but where is it in debug mode?
0
by: =?Utf-8?B?UmljayBHbG9z?= | last post by:
For some unknown reason (user error?), I cannot get a NameValueCollection to persist in the app.config file. Unlike other settings, I cannot get the String Collection Editor GUI to allow my to...
0
by: logicnet.dk | last post by:
Is it possible to decide where user.config is stored by Properties.Settings.Default.Save? The default location seems to be "C:\Documents and Settings\\Local settings\Application Data\\\" and there...
13
by: Dave | last post by:
When using the properties designer to store application wide properties how do you get this to work across a project group containing an EXE and a collection of DLLs. I'm using C#.Net 2005. I...
3
by: DaBrain | last post by:
I have a program that uses settings. When I save my settings they are saved: Properties.Settings.Default.Save(); when I restart the application, my settings are present, the changes are in...
2
by: jtw | last post by:
I am trying to read an application setting from my App.Config file that I have modified from the default value that was entered into the settings window under project properties. string myConn =...
3
by: Dom | last post by:
I notice from the IntelliSense window that Properties.Settings.Default have events, such as PropertyChanged. This could be useful, but how do I capture this event? I'm used to inserting a control...
1
by: KS | last post by:
How can I pu one of my own object instances in Properties.Settings.Default ? Best regards KSor, Denmark
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.