Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

storing users personal settings within application (no database) 2

Status
Not open for further replies.

davejam

Technical User
Jan 6, 2004
313
0
0
GB
Hi all,

With vb.net can you store within an exe information for a users entered settings....

I am creating an downloader exe tool for use by our clients... i want this to be unmanaged so the exe will be available to download from our website.

The plan is that they enter the user details into the config screen when running the exe and it can then connect to our web service and download the information setup for download against that client acount.

The thing is i don't want it to forget the clients entered data each time and would love it to just store it without having to have a database.... this is three bits of data, username, account, frequency (for downloads)

Any ideas would be brilliant

Cheers

daveJam

it works on my machine, so technically i win!
 
This should give you what you need:


I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
(OP: Not meaning to high jack topic, but seems applicable to the discussion.)

Maybe I missed it when grazing over it, but what about Terminal Services and a multi-user account? From what I saw, it still could not differentiate between 4 different systems, using the same login account on Terminal Services.

Since everything resides on the TS, there is only one instance of the application installed. Therefor saving to an app.config will still cause those settings to be applied to everyone that executes the program that uses the generic login.

Any ideas on how to accommodate/work around?

--------------------------------------------------
Stubbornness is a virtue -- if you are right. --Chuck Noll
--------------------------------------------------
 
ousoonerjoe,

The scenario you present is a good example why user settings should never be stored in app.config. See the article I referenced above, the section titled "Why Shouldn't You Use App.Config?"

In the scenario you present, I would implement a login system in the application in order to differentiate between users. Then save each user's settings to an XML file as shown in the article I referenced above, or more likely use a database to store user data.

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
A bit old now, but....

I ended up creating a seperate xml file holding the information i needed, but stored it within the c:\program data folder within the folder i specify as relevant (and unique)

This was the file is associated with the program but not with each uupdate of the program, thus remembering the entered details which i can retrieve each time it is restarted.

I also notice that, as this file is associated with my program, when i uninstall the program it also removes the folder i use for the program data.... which is just a perfect accident!!

Thanks for the pointers

daveJam

it works on my machine, so technically i win!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top