By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,650 Members | 1,785 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,650 IT Pros & Developers. It's quick & easy.

Best Place to Store Personal Settings

P: n/a
Hi to All,

I'm developing an application in VB .NET. I have a question: what is the
best place to save personal settings of my users? I mean, when a user uses
my application, it can create a personal profile (e.g. last files opened,
custom settings, etc...). What is the best place to save them? At first, I
thought to save them in the registry, in the CURRENT_USER section, but I'm
not sure every user can have read/write access to it.

What do you suggest? Where can I find more information?
Thanks,

Paolo
Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Registry for personal setting is of however, you may want to check this out
as well.

http://msdn.microsoft.com/library/de.../html/cmab.asp

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
"Marco" <no****@nospam.com> wrote in message
news:_5***********************@news4.tin.it...
Hi to All,

I'm developing an application in VB .NET. I have a question: what is the
best place to save personal settings of my users? I mean, when a user uses
my application, it can create a personal profile (e.g. last files opened,
custom settings, etc...). What is the best place to save them? At first, I
thought to save them in the registry, in the CURRENT_USER section, but I'm
not sure every user can have read/write access to it.

What do you suggest? Where can I find more information?
Thanks,

Paolo

Nov 20 '05 #2

P: n/a
* "Marco" <no****@nospam.com> scripsit:
I'm developing an application in VB .NET. I have a question: what is the
best place to save personal settings of my users? I mean, when a user uses
my application, it can create a personal profile (e.g. last files opened,
custom settings, etc...). What is the best place to save them? At first, I
thought to save them in the registry, in the CURRENT_USER section, but I'm
not sure every user can have read/write access to it.


'Environment.GetFolderPath(Environment.SpecialFold er.LocalApplicationData)'
or 'Environment.GetFolderPath(Environment.SpecialFold er.ApplicationData)'

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3

P: n/a
I would suggest Mr. Wagner's method with just 2 additions:
1) Store your settings in a subfolfer of AppData (i.e.
'Environment.GetFolderPath(Environment.SpecialFold er.ApplicationData) +
"MyAppName." Don't worry, it's considered OK to leave behind your app's data
in this folder even after uninstall. In fact, it's considered bad form to
delete it.
2) Store your settings in an XML file in this directory... make your job
easier by creating your simple "GetSettings(Section,
Key)/WriteSetting(Section, Key, Value)" functions to mimic traditional INI
files.

However, if your program is a database client, I prefer to store my user's
settings in a table in the database.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2j*************@uni-berlin.de...
* "Marco" <no****@nospam.com> scripsit:
I'm developing an application in VB .NET. I have a question: what is the
best place to save personal settings of my users? I mean, when a user uses my application, it can create a personal profile (e.g. last files opened, custom settings, etc...). What is the best place to save them? At first, I thought to save them in the registry, in the CURRENT_USER section, but I'm not sure every user can have read/write access to it.

'Environment.GetFolderPath(Environment.SpecialFold er.LocalApplicationData)' or 'Environment.GetFolderPath(Environment.SpecialFold er.ApplicationData)'

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #4

P: n/a
Hi Marco,

I prefer OHM's answer

Cor
Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.