Re: Registry keys for my application

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Frank Carr (jfcarr_at_msn.com)
Date: 03/30/04


Date: Tue, 30 Mar 2004 08:25:46 -0500


"Bob Butler" <tiredofit@nospam.com> wrote in message
news:uF0shlbFEHA.696@TK2MSFTNGP12.phx.gbl...

> IMO, none. Use an INI file or some other private location. Private data
> does not belong in a public repository.

INI is fine for single users and for overall program settings that aren't
user specific but when you have multiple users with their own preferences,
for example, under Terminal Server, using the registry makes it easy to keep
up with each user's settings. To use INI files you would have to create a
uniquely named file or cram everything into a single INI (aka a 'public
repository') if you kept that file in the program's directory. Another
alternative would be to store individual settings files under the "Documents
and Settings" folder structure but this structure isn't around in Win98/95
and would be more complex to code.

> If you do it
> yourself it'd probably be
hkey_current_user\software\<vendor>\<application>

This is an important point. Any data like this should go under
HKEY_CURRENT_USER, not HKEY_LOCAL_MACHINE. Otherwise you will encounter
security issues on a well managed network. It's amazing how many programs
try to write to local machine.

-- 
Frank Carr
jfcarr@msn.com
http://www15.brinkster.com/vbnotebook


Relevant Pages

  • Re: Registry keys for my application
    ... INI is fine for single users and for overall program settings that aren't ...
    (microsoft.public.vb.enterprise)
  • Re: .ini .dat or registry question
    ... I'd far rather help a user get the settings in an INI ... Registry, and slapped together in a real mess no human would ever want to deal with. ...
    (microsoft.public.vb.winapi)
  • Re: .ini .dat or registry question
    ... > OTOH, I'd far rather help a user get the settings in an INI straight, than ... the INI API was obsolete. ... I've also read about the registry being frowned upon ...
    (microsoft.public.vb.winapi)
  • Re: New Microsoft Anti-Spyware Tool
    ... > registry concept is an example of this. ... is it any different to keep various program settings, user settings, etc. in ... I would grant you that it makes moving program settings a little harder ... DECADE now to keep data files in 'My Documents,' and there's been a great ...
    (sci.electronics.design)
  • Re: .ini .dat or registry question
    ... >> OTOH, I'd far rather help a user get the settings in an INI straight, than ... >the INI API was obsolete. ... applications should store initialization information in the registry. ...
    (microsoft.public.vb.winapi)