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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving values 1

Status
Not open for further replies.

Mats

Technical User
Feb 18, 2000
83
EU
How can I save variables in an .EXE without using INI or other textfiles? What I need is a way to store e.g. a path in the EXE and retreive the same path the next time the EXE is started without reading any other file.

Mats
 
Yeah dont muck around with ini files. Its much easier to use the registry, then you dont have extra files lying around.

Check out this link that explains everything very weel and gives a module to download:


Good luck

elziko
 
warning: savesetting points to CURRENT_USER
Different user=> different setting!!!

Use API to save to LOCAL_COMPUTER instead.
 
Thanks a lot for all your input!

Actullay MS Visual Studio ships with a good module for writing/reading registry entries to any root. The code from TheScarms was also good.

Mats
 
Hi Mats, I'm trying to create registry entries in a different root from the VB default. I would love to know where the module is located that you said was shipped with Visual Studio.

Simon.
 
Take a look at your VB6 disk:vb98\code\regkeys.bas and loadres.bas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top