The Windows Registry
Almost all systems have settings. These settings persist; they are still there after a system shutdown, reboot, or whatever reason. The contents of these settings vary; they could be anything your system needs. It could be a connection string to a database, a location where you can store files, the font used to generate reports, and so on. Anything you cannot know in advance while writing the software or that a user or system administrator might want to change should be in a separate location from your system.
In the past, Windows applications and systems used INI files. An INI file is an elementary file structure. They consist of sections, each with a key/value pair of data. A section is part of the file that is surrounded by the [
and ]
characters. The key/value data is a line such as mykey=myvalue
. Each section or data line is on a separate line, and that is it.
We placed the INI file in a known location, usually in the same directory as the main application...