Saving configs (was: Nexus v2)
- Posted by Sabal.Mike at notations.com Nov 01, 2002
- 423 views
Personally, I don't like saving preferences in the Registry, and I always feel threatened by programs that do. For one, it makes the program harder to uninstall. For another, there's always the danger of trashing your OS if the PC dies in the middle of a registry write. While the danger is small, it does exist. A separate config file stored in the same directory as the executable removes these two constraints. My preference is an INI file. It makes it easier for the user to make config changes outside the program if necessary. It also makes it easier to change configurations for different users. The format is extensible for newer versions of your program, and it is readily understood by most advanced users and developers. There is also an INI library already in the archives, although I haven't used it myself (I have my own routine that I adapt to each program). Lastly, an INI file is much more portable than registry keys are, including across different versions of Windows. Just my ½ cent (inflation, ya know...), Mike Sabal