Re: .ini .dat or registry question

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



"Steve Easton" <admin@xxxxxxxxxxxxx> wrote in message
news:OZm%23c0%23gFHA.1048@xxxxxxxxxxxxxxxxxxxxxxx
> Which is better used to store 2 or 3 simple program settings, an ini file,
> dat file or the
> registry.
>
> From reading posts here, it seems using the registry is frowned upon, but
> everything I
> read
> recommends "against" using a file of any sort.
>
> As always, tyia.
>
> --
> Steve
> 95isalive
> This site is best viewed..................
> ..............................with a computer

Besides the "where do I store it" question, there's a "who's going to use
it" question. For the most part, files will be available to anyone that logs
on. If you're storing to an INI file and want to keep user specific
settings, it'll be a bit extra work (not much... but some) If you store to
the registry using VB's built in reg functions, you have no choice. Your
settings will be user specific.

Here's a couple of great INI file functionality wrappers. I've used the
first many times (because I found it first) but they both make it easy to
manipulate INI files.

Easy INI File Access
http://www.vbaccelerator.com/home/VB/Code/Libraries/Registry_and_Ini_Files/Easy_Ini_File_Access/article.asp

kpIni
http://vb.mvps.org/samples/project.asp?id=kpIni

--
Ken Halter - MS-MVP-VB - http://www.vbsight.com
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Please keep all discussions in the groups..


.



Relevant Pages

  • 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: 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 File vs Registry
    ... I have a class derived from CArchive and store my own version info at the start of the file. ... I tend to use the registry for execution-to-execution parameters which can be readily reconstructed from defaults. ... I do not know what a best practice is here. ... not specified where you would keep the .INI file. ...
    (microsoft.public.vc.mfc)
  • 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)