473,472 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Best Place to Store Personal Settings

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
4 2465
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
* "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
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
Hi Marco,

I prefer OHM's answer

Cor
Nov 20 '05 #5

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

Similar topics

3
by: Newbie | last post by:
Hi all, A have several forms with unbound combo boxes, the combo boxes are used to filter the data in the forms. What I would want is that my application stores the most recent settings of these...
0
by: Anonieko Ramos | last post by:
ASP.NET Forms Authentication Best Practices Dr. Dobb's Journal February 2004 Protecting user information is critical By Douglas Reilly Douglas is the author of Designing Microsoft ASP.NET...
3
by: Robin Tucker | last post by:
I'm a bit confused about where to put my program settings. Firstly, I can choose (I suppose) between .ini, .xml or the registry. Which one is best? Secondly, *where* do I place any files I...
0
by: Harley | last post by:
I am trying to write a personal app to keep a bank balance and history. The problem I'm haveing is finding a decent way to store the data on a pocketpc under .net compact framewok useing vb.net....
4
by: Dave | last post by:
I have some data values that will will rarely change over the life of the program. I don't think it is wise to save it in a database. Is it ok to save them in Properties.Settings if I have many...
4
by: Steve | last post by:
When I create a new project in 2005, and I go to save the project files, vb.net displays a dialog box that repeats the name of the application and has a checkbox if I want to create a new directory...
7
by: Steve | last post by:
I am building an object library for tables in a database. What is the best practice for creating objects like this? For example, say I have the following tables in my database: User: - Id -...
5
by: Allan Ebdrup | last post by:
I have a webservice in ASP.Net 2.0, I need to store and load a xml configuration file in relation to one of the web methods in my webservice. What's the best place to store and the best way to load...
3
by: Earl | last post by:
..Net Winforms app. I'm currently using the database to store user options. But I wonder if there is a better, faster technique. For a simple example, look at the Visual Studio 2005 Tools Options...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.