An initialization file ( short INI file ) is a text file that contains pairs of values in a specific format. Initialization files are often used by desktop applications to store settings.
A value pair consists of a key and a value, separated by equal signs. Several values pairs are separated by line breaks. Value pairs can be grouped into sections, which are listed in brackets. In addition, the file format allows the definition of comment lines that begin with a semicolon.
; comment [ Section] ; comment Key = value When you create an INI file, the following rules must be observed:
- Each section may occur only once.
- Each key can only appear once per section.
- On values are accessed by means of section and key.
- Comments are on a "; " initiated.
- Comments may (not behind section headings or keys ) are only available on separate lines.
- Spaces and quotation marks are treated partially differently by different programs.
- Not case sensitive
- No and False as 0, True and Yes interpreted as 1.
There are files with almost the same structure, which differ only by the following features:
- Others (eg conf cfg) or missing file extension
- Introduction of comments with a different character (eg "#").
An example of such a variation is found in the configuration files for Subversion repositories.
- XML ( Extensible Markup Language )
- YAML ( YAML Is not Markup Language )
Under current Windows versions, there are two alternative / competing philosophies for the default file path to the INI filing, here the example of Windows XP:
- \ Documents and Settings \ username \ Application Data \
\ (in general: % APPDATA % \ , english: \ Documents and Settings \ username \ Application Data \ \ )
- \ Program Files \
\ (in general: % PROGRAM FILES% \ , english: \ Program Files \ \ )
From Windows Vista to changes in the programs folder by non-administrators will be blocked by default by User Account Control, which saved ini files are there too affected. Therefore, some programs assign when installing, all rights for the installed files to the user "Everyone". In these versions of Windows, if necessary, also exist automatically generated copies of the INI files in the shadow directory USERDIR $ $ \ AppData \ Local \ VirtualStore \ Windows \.
Programs that use INI files in its own program folder, are often portable software.