Re: Registry vs .ini Win 2000

From: Mark V (notvalid_at_nul.invalid)
Date: 09/23/04


Date: Wed, 22 Sep 2004 20:19:34 -0700

In microsoft.public.win2000.registry Ndi wrote:

> Registry:
> * Centralised backup of all settings by the user (through
> backup) * Faster access (Registry is cached at all times)
> * Per-value, per-key security
> * More acesible patching of eventual errors (through a .reg
> file) * User-transparent. If you want a "hidden" setting, you
> don't use a file.
> Especially .INI
> * Data format-proof. Registry can hold anything (just keep the
> size down
> if you write in MY registry)
>
> INI files:
> * Survives re-installation of the OS
> * Allows complete removal of settings, porting, network
> distribution * Simpler layout and debugging (anyone can edit and
> delete an INI with no
> danger of nuking other programs)
> * Ability to uninstall ny (oh-so-frequent) deletion of the
> folder. * developed-for-ini-files software is easy to port.
> Linux, for example,
> has no registry but it does support INI and configuration files
> (that are, basically, ini files with different syntax)
> * debugging is easier, as INI files can be easyly diff 'd (FC
> /L)
>
> More should be said, but basically that's the idea. If you build
> for
> stability, you should have an ini file. A recovery tool with
> registry settings isn't the best option. If you build for speed,
> registry is better.
>
> Also, storing in a file keeps the load of the registry. As
> stated, it's
> cached and more you store, more RAM you hog. OTOH, not everything
> can be stored into an INI, like raw data and multi-line text, not
> to mention formatted text (unless you convert it).
>
> As a developer, I go for the registry for simple settings I can
> nuke at
> any time (window coordinates, options, etc) and keep INI files for
> critical things, like addon locations and other stuff that might
> be needed after a crash. A dual solution might work for the best.
>
> Sometimes, however, you have no choice. Like when building a
> web-updating
> tool, it needs to read the installation path from the registry, an
> INI file is useless. Or a browser object, shell location, etc
> which needs to access a path from anywhere. In short, it's your
> call. There is no such thing as incompatibility, an INI file will
> never change or outdate because you write it and it's -as far as
> the system is concerned- proprietary.

Just wanted to add that there are a handful of applications I've seen
that actually use the registry but also offer an Export/Import option
to/from a (transportable/transferable) INI file. Typically this is
used for HKCU configuration data. Some of the best of both worlds
and worthy of consideration by developers IMO.



Relevant Pages

  • Re: Reg/INI Discussion from much earlier
    ... >in the event of an improper shutdown, the registry is NOT saved. ... >uncontrolable factor and the user wants to save his/her settings. ... Using both the Registry and the INI file has got to be /slower/ than ... I should really do a similar test with FileMon ...
    (microsoft.public.vb.general.discussion)
  • Re: INI formatting
    ... Microsoft's with program settings. ... the registry in Vista. ... But I can see where this restriction in Vista ... | into INI file located in C:\MyCompanyNam\MyProgram. ...
    (microsoft.public.vb.general.discussion)
  • Re: Best way to use INI file
    ... I was told that there may be some issues with the security settings on ... I didn't have a way to test writing to the registry and I ... Is there any particular reason you are using an INI file rather ... than GetSettings and SaveSetting to store data in the registry. ...
    (microsoft.public.excel.programming)
  • Re: Best way to use INI file
    ... I was told that there may be some issues with the security settings on ... I didn't have a way to test writing to the registry and I ... Is there any particular reason you are using an INI file ... rather than GetSettings and SaveSetting to store data in the registry. ...
    (microsoft.public.excel.programming)
  • Re: registry entry or file
    ... Is there any specific format to follow in INI file. ... > registry, unless necessary. ... > prompted me to spout my opinion because they disagree with me). ... >>This dll will be distributed in productsand used by PC ...
    (microsoft.public.win32.programmer.ui)