Re: Registry verses INI
- From: "Brian" <bkstigler@xxxxxxx>
- Date: Thu, 19 Oct 2006 07:11:15 -0700
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
.
- References:
- Registry verses INI
- From: Brian
- Re: Registry verses INI
- From: MikeD
- Registry verses INI
- Prev by Date: Re: Compile Differences, WinXP-Pro and Win2K
- Next by Date: Re: Screen Size
- Previous by thread: Re: Registry verses INI
- Next by thread: Re: Need help. Different apps order on Alt+Tab
- Index(es):
Relevant Pages
|