How Windows NT Components Use the Registry
Under versions of Windows for MS-DOS, starting the system, connecting to the network, and running applications involves multiple configuration files with some form of synchronization between them. With Windows NT, the operating system stores and checks the configuration information at only one location—the Registry.
Figure 10.1 Data in the Windows NT Registry
The following figure shows how various Windows NT components and applications use the Registry. The numbered explanations below this illustration provide details.
Figure 10.2 How Registry information Is Used by Windows NT
- Setup. Whenever you run the Windows NT Setup program or other setup programs for applications or hardware, the Setup program adds new configuration data to the Registry. For example, new information is added when you install a new SCSI adapter or change the settings for your video display.
- Recognizer. Each time you start a computer running Windows NT, the Hardware Recognizer places hardware configuration data in the Registry. This information includes a list of hardware detected in your system. On x86-based computers, this is done by a program called NTDETECT.COM and the Windows NT Kernel (NTOSKRNL.EXE). On RISC-based computers, this information is extracted from the ARC firmware.
- Windows NT kernel. During system startup, the Windows NT Kernel extracts information from the Registry, such as the device drivers to load and their load order. The NTOSKRNL.EXE program also passes information about itself to the Registry, such as its version number.
- Device drivers. Device drivers send and receive load parameters and configuration data from the Registry. This data is similar to what you might find on the DEVICE= lines in the CONFIG.SYS file under MS-DOS. A device driver must report system resources that it uses, such as hardware interrupts and DMA channels, so that the system can add this information to the Registry. Applications and device drivers can read this Registry information to provide users with smart installation and configuration programs.
- Administrative tools. The administrative tools in Windows NT, such as those provided in Control Panel and in the Administrative Tools program group, can be used to modify configuration data. The Registry Editor is helpful for viewing and occasionally making detailed changes to the system configuration. You can also use the Windows NT Diagnostics program (WINMSD.EXE) to view configuration information stored in the Registry. For details, see Chapter 11, "Registry Editor and Registry Administration."
The Registry is analogous to the .INI files used under Windows for MS-DOS, with each key in the Registry similar to a bracketed heading in an .INI file, and entries under the heading similar to values in the Registry. However, Registry keys can contain subkeys, while .INI files do not support nested headings. Registry values can also consist of executable code, rather than the simple strings representing values in .INI files. And individual preferences for multiple users of the same computer can be stored in the Registry, which is not possible with .INI files.
Although Microsoft discourages using .INI files in favor of using Registry entries, some applications (particularly 16-bit Windows-based applications) will continue using .INI files for the time being. Windows NT supports .INI files solely for compatibility with those applications and related tools (such as setup programs). Some form of the files AUTOEXEC.BAT and CONFIG.SYS also still exist to provide compatibility with applications created for MS-DOS and Windows 3.1. For details about how Windows NT uses such files in conjunction with the Registry, see Chapter 14, "Initialization Files and the Registry."