Re: Registry verses INI



All.
Guess my question wasn't so strange after all considering the ambiguities
that Microsoft created. I will take a look at the CSIDL and try to educate
myself on that area.

Thanks for the suggestions.


"MikeD" <nobody@xxxxxxxxxxx> wrote in message
news:%23qItWZy8GHA.2120@xxxxxxxxxxxxxxxxxxxxxxx

"Brian" <bkstigler@xxxxxxx> wrote in message
news:%23pLAx2w8GHA.4288@xxxxxxxxxxxxxxxxxxxxxxx
I've seen various post suggest that an INI file is preferred to using the
registry for saving application configuration data. My question is
this... If a user doesn't have admin rights on the PC, where is the best
place to store the INI file?

With the registry, I can tell the app to write to the HKEY_CURRENT_USERS
area. So wouldn't this be a better place to store configuration data
when a user has limited rights?

Just trying to get some clarification on this issue before driving down
one path or the other. The data I need to store isn't too extensive...
just a handful of items and parameters.


There's no cut and dry answer to that. Blame Microsoft for changing
"standards" and not even following their own "suggested standard". When
Win95 first came out, MS said "Don't use INI files anymore. Use the
Registry". 11 years later, Microsoft STILL uses INI files an awful lot.

Bottom line is that it's up to you. Many people are against using the
Registry because it just bloats it. Other programmers prefer one or the
other for various reasons....and some use both depending on the
circumstances.

If you use an INI file, though, you do have to be careful about where you
write it. If you use the Win32API functions for writing INI files, I
*believe* write permissions are inherent. But don't quote me on that.
Personally, I'm one of those that sometimes uses INI files and sometimes
uses the Registry. When I use INI files, I either write them to that
user's Application Data folder or the "All Users" Application Data
folder(depending on whether the saved settings should apply to all users
or just that user). To get the path to either folder, use the
SHGetSpecialFolderPath Win32 API function.


--
Mike
Microsoft MVP Visual Basic



.



Relevant Pages

  • Re: Registry verses INI
    ... If a user doesn't have admin rights on the PC, where is the best place to store the INI file? ... With the registry, I can tell the app to write to the HKEY_CURRENT_USERS area. ... MS said "Don't use INI files anymore. ...
    (microsoft.public.vb.general.discussion)
  • 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)
  • Re: Using the registry
    ... >I have been using the old TurboPower Onguard components to implement reduced ... >idea in their tutorials and used ini files to store data. ... There are specific areas of the registry for your program to store ...
    (comp.lang.pascal.delphi.misc)
  • RE: browes problem
    ... Important This article contains information about modifying the registry. ... 256986 Description of the Microsoft Windows Registry ... Your Internet Explorer home page has been changed to a different Web site ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • RE: Error 1402
    ... >Microsoft Corporation ... >>This is a permissions issue that must be fixed through ... >>the Windows operating system. ... >>Do not use the registry key given in the Microsoft ...
    (microsoft.public.windowsxp.security_admin)