Jump to content

Windows INI Files

From EDM2
Revision as of 04:43, 9 February 2024 by Ak120 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A set of plain text files used to configure the Win-OS/2 subsystem of OS/2 and to some degree all versions of MS Windows. Introduced with MS Windows 1.0 they were up until the release of Windows NT and Windows 95 the primary mechanism to store and adjust the settings of the operating system, a role that has since been taken over by the Windows registry file. It was also expected that other Windows programs used INI files as well either by writing into the one of the Windows INI file via the Profile API or by creating their own INI file inside the Windows root folder. Because this was sort of a semi-standard a number of DOS programs started to use them as well, although obviously DOS programs could only access the Profile API if running under Windows so most of them wrote directly into the ini file.

While INI files exist in newer versions of MS Windows they are there primarily for compatibility reasons since a number of third party software programs wrote directly into the file rather than using the API like they were supposed to, a mechanism called "Initialization File Mapping" monitors changes to the INI files and translates them into resource file data and provides an emulation of the Profile API for legacy software. INI files are one of the places you will often find crud left over from WinOS/2 software that you have uninstalled, where installers forget to remove their configuration settings.

INI file structure

An INI file is a plain text file that is made up of keys, with each key having a name and a value that are separated by an equal character. They are usually arranged into sections named after the Windows subsystem or software package they configuring, but that is optional and the sections have no effect on how Windows reads the file and are simply there to aid in human editing of the file, the section name needs to reside in its on line and be enclosed by square brackets. Names and section names are never case-sensitive, so the name MyProgIn is the same as mYpROGiN as far as WinOS/2 parses it, however values can be anything including text, binary, hex, numbers or file names and so on, and they might be case-sensitive, even though they usually are not. Comment lines are created by using a semicolon at the beginning of the line.

This is a simple example of an INI file:

[This Is a Section]
keyname=keyvalue
keynumvalue=234
keyfilevalue=helvetic.fon
;This line is a comment

Software

There is a hidden text editor called "Sysedit" that supplied with WinOS/2 that opens up the three main INI files for editing. If you have the Windows folder in the DOS or OS/2 path you can simply type "sysedit" from the command line, or you can locate it in the root WinOS/2 directory.

Text & programmers editors with INI file support

  • Boxer - Windows INI file syntax highlighting support built in
  • jEdit - Java based - Windows INI file syntax highlighting built in