How .ini Files Are Mapped to the Registry

If you install Windows NT as an upgrade to Windows 3.x, all of the settings in the initialization files are copied into the Registry, including settings in Control.ini, Progman.ini, System.ini, Win.ini, and Winfile.ini. You can see where the Windows initialization files are mapped in the Registry by viewing the subkeys and value entries under this path:

HKEY_LOCAL_MACHINE\Software
\Microsoft
\Windows NT
\CurrentVersion
\IniFileMapping

When you install an application created for 16-bit Windows, the application's setup program creates its own .ini file or creates entries for the Win.ini or System.ini file in the same way that it does for any version of Windows 3.x. These entries are not updated in the Registry because these applications do not have a way to access the Windows NT Registry. For this reason, basic System.ini, Win.ini, and Winfile.ini files appear in the Systemroot directory in Windows NT.

If a Windows-based application tries to write to Win.ini, System.ini, or any other section listed in the IniFileMapping key, and if the application uses the Windows NT Registry APIs, the information is stored in the Registry. If the application writes to other sections of the .ini file or tries to open the .ini file directly without using the Windows NT Registry APIs, the information is saved in an .ini file.

To find mapping information in the HKEY_LOCAL_MACHINE\Software key, the system searches for the filename extension of the initialization file. If it finds the filename extension, it looks under the mapped key for the name of the application associated with that file type and a variable name. If necessary, it continues to look for keys whose value entries are the variable names. If no mapping for either the application name or filename is found, the system looks for an .ini file to read and write its contents.

Tables 26.1 through 26.3 show where system settings are saved in the Registry in comparison to initialization files used with Windows 3.1 for MS-DOS.

In the entries in the IniFileMapping key and in Tables 26.1 through 26.3, the following symbols are used:

Symbol

Description

!

Forces all writes to go to both the Registry and to the .ini file on disk.

#

Causes the Registry value to be set to the value in the Windows 3.1 .ini file whenever a new user logs on for the first time after Setup, if Windows NT was installed on a computer that had Windows 3.1 already installed.

@

Prevents any reads from going to the .ini file on disk if the requested data is not found in the Registry.

USR

Stands for HKEY_CURRENT_USER, and the text after the prefix is relative to that subtree.

SYS

Stands for HKEY_LOCAL_MACHINE\Software, and the text after the prefix is relative to that key.