Re: Best Programming Practice?



It really all depends on how things are implementd in the end. I agree with
what your saying about XML files and as long as the program is developed
correctly it shouldn't matter if it's registry, ini, xml or whatever. The
problem, in the end, is really whether a program is developed properly (if
using files, the files do not need to be in one partciular area, etc). I
can't count how many times some programmer has hardcoded a path to a .ini
file making it almost impossible to get the software to work in a TS
environment. so maybe I'm wrong in saying .ini files are bad but when
settings are in the HKCU portion of the registry you just don't run into
those types of issues.

Jeff Pitsch
Microsoft MVP - Terminal Services
http://www.sbcgatekeeper.com
Your Terminal Services Security Website


"TP" <tperson.knowspamn@xxxxxxxxxxxxxxx> wrote in message
news:un4OfsEPGHA.2236@xxxxxxxxxxxxxxxxxxxxxxx
Jeff,

Storing preferences in files does not necessarily equal ini files. The
"new and improved" version of ini files are XML files.

For apps developed with .NET, it is recommended to only use the registry
for backward compatibility with legacy apps. Now, I am not sure I agree
completely with this stance, but it fits with the general approach of .NET
xcopy deployment, clickonce, etc.

For modern apps, it is not reasonable to store all the per-user
information in the registry. MSDN recommends only storing 1-2KB in the
registry, and if more point to a file. The XP specifications say a max of
64KB in HKCU, with a max of 128KB combined HKCU and HKLM at install time.

Another important thing to consider is that more registry use equals more
Paged Pool memory use under windows 2000. Paged Pool memory is a limited
resource, so this potentially translates to less users per server.

Under 2003 the situation is better because the registry was moved out of
Paged Pool, but it still takes up memory in the system cache. Memory
needed for registry competes with the memory needs of applications, again
potentially translating to less users per server.

Personally I store most per-user settings in SQL Server and XML files, and
sometimes a tiny amount in the registry.

-TP

Jeff Pitsch [MVP] wrote:
Truthfully, from an admin standpoint, i don't wan tto have to deal
with ini files. When I help companies evaluate applicatoins, things
we look at are how well developed applications are and it is a
blackmark when an app uses ini files for per user settings. Take
that for what you will, that's obviously just my opinion.

Jeff Pitsch
Microsoft MVP - Terminal Services
http://www.sbcgatekeeper.com
Your Terminal Services Security Website




.



Relevant Pages

  • Re: Ini File vs Registry
    ... INI files should be deprecated... ... I would use the registry only if strictly required... ... XML files are easily portable from one computer/user to another. ... In my case I have a bunch of User customizable reports, ...
    (microsoft.public.vc.mfc)
  • Re: Best Programming Practice?
    ... Storing preferences in files does not necessarily equal ini files. ... For apps developed with .NET, it is recommended to only use the registry for backward compatibility with legacy apps. ... Another important thing to consider is that more registry use equals more Paged Pool memory use under windows 2000. ...
    (microsoft.public.windows.terminal_services)
  • Re: Ini File vs Registry
    ... I'm not sure if INI files support Unicode, instead XML files are fine to ... I would use the registry only if strictly required... ... XML files are easily portable from one computer/user to another. ... In my case I have a bunch of User customizable reports, ...
    (microsoft.public.vc.mfc)
  • Re: ini files or not
    ... It is or the registry or XML files in whatever format. ... whether ini files are still the way to go in the .net era. ...
    (microsoft.public.dotnet.general)
  • Re: .ini .dat or registry question
    ... > Which is better used to store 2 or 3 simple program settings, an ini file, dat file or the registry. ... implementing this with INI files is possible but not as clean. ... you should be fairly restrained about what and how much information you do store in the registry - there ...
    (microsoft.public.vb.winapi)