473,761 Members | 9,480 Online
Bytes | Software Development & Data Engineering Community
+ 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 2495
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.Ge tFolderPath(Env ironment.Specia lFolder.LocalAp plicationData)'
or 'Environment.Ge tFolderPath(Env ironment.Specia lFolder.Applica tionData)'

--
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.Ge tFolderPath(Env ironment.Specia lFolder.Applica tionData) +
"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(Se ction,
Key)/WriteSetting(Se ction, 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.Ge tFolderPath(Env ironment.Specia lFolder.LocalAp plicationData)' or 'Environment.Ge tFolderPath(Env ironment.Specia lFolder.Applica tionData)'

--
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
3081
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 comboboxes. I would like to store them in a table, so the next time the user starts the application, his/her personal settings are retrieved and used. I tried a lot and also looked into google, but no succes so far. I am a newbie and enjoying...
0
4248
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 Applications and owner of Access Microsystems. Doug can be reached at doug@accessmicrosystems.com. --------------------------------------------------------------------------------
3
1908
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 generate on a per-user or per-application basis? For example, I cannot place user settings in the \Program Files\My Application directory, because many users won't have write access to it. Should I place it into the documents and...
0
2218
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. I need to store type, date, description, and total for each check/debit transaction as well as a balance and user settings. My problem is that I am learning vb.net now and I'm not ready to move into datbases yet so xml seems my only viable option,...
4
1800
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 different values? Example I want to save information about the user of the software, eg, name, address, telephone #. -- L. A. Jones
4
1526
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 for it. If I click the checkbox, the new subdirectory gets the same name as the higher subdirectory (which is the application name). For example if the project is called Test, then the subdirectory structure looks like Visual Studio 2005...
7
3583
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 - FirstName - LastName - CompanyId (many-to-one )
5
1875
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 my xml configuration file? I can't integrate the settings in web.config, it has to be a seperate file. Kind Regards, Allan Ebdrup
3
1700
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 screens ... are all of these choices being saved XML, a database or where? Is the OK button a "Save" button or are the changes committed at the time you check/uncheck? I'm doing everything Winforms and while my system works well, I'm always looking...
1
9905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9775
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8780
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7332
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5229
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3881
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 we have to send another system
3
3456
muto222
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.