HKEY_LOCAL_MACHINE\Hardware Key

The HKEY_LOCAL_MACHINE\Hardware key contains the hardware data in the Registry that is computed at system startup. This includes information about hardware components on the system board and about the interrupts hooked by specific hardware devices.

The Hardware key contains distinct and important sets of data in three subkeys—Description, DeviceMap, and ResourceMap. These keys are described in the following sections.

All information in HKEY_LOCAL_MACHINE\Hardware is volatile, which means that the settings are computed each time the system is started and then discarded when the system stops. Applications and device drivers use this subtree to read information about the system components, store data directly into the DeviceMap subkey, and store data indirectly into the ResourceMap subkey.

Tip

Do not try to edit the data in HKEY_LOCAL_MACHINE\Hardware; much of the information appears in binary format, making it difficult to decipher.

To view data about a computer's hardware in an easy-to-read format, run Windows NT Diagnostics, click the Services tab, and then click the Devices button (in the lower right corner of the tab). Windows NT Diagnostics extracts the information from the Registry and renders it in a more readable format.

Description Subkey

The Description subkey under HKEY_LOCAL_MACHINE\Hardware displays information from the hardware database built by the firmware, the Hardware Recognizer (Ntdetect.com), and the Windows NT Executive, which manages the interface between the Kernel and the environment subsystems:

The Hardware Recognizer for Intel-based computers detects the following items:

Bus/adapter type

Video adapter

Keyboard

Floating-point coprocessor

SCSI adapters

Mouse

Communication ports

Floppy drives

Machine ID

Parallel ports


Note

Network adapter cards are not detected as part of startup; they are detected either during Windows NT Setup or when you install a new network adapter. To install a network adapter, in Control Panel, double-click Network, click the Adapters tab, then click Add. For details, see "Network Settings in the Registry," later in this chapter.

The key HKEY_LOCAL_MACHINE\Hardware\Description\System\MultifunctionAdapter contains several other subkeys, each corresponding to specific bus controllers on the local computer. Each of these subkeys describes a class (or type) of controller, including controllers for disk drives, display, keyboard, parallel ports, pointing devices, serial ports, and SCSI devices. The subkey's path describes the type of component. The numbering for hardware components is zero-based, which means that, for example, the first (or only) disk controller appears under the 0 subkey.

The name of the MultifunctionAdapter subkey depends on the bus type. For example, for ISA and MCA buses the subkey name appears as MultifunctionAdapter. For EISA buses, the subkey name is EisaAdapter, and for TurboChannel buses, the subkey name is TcAdapter. Figure 23.8 shows a MultifunctionAdapter subkey.

Figure 23.8 A MultifunctionAdapter subkey for an ISA or MCA bus

For each detected hardware component, the optional Component Information and Configuration Data value entries store version and configuration data in binary format. The Identifier entry contains the name of a component, if specified. For details on these value entries, see Regentry.hlp, a Help file on the Windows NT Workstation Resource Kit CD.

DeviceMap Subkey

In the HKEY_LOCAL_MACHINE\Hardware\DeviceMap\Device key, each Device subkey contains one or more values to specify the location in the Registry for specific driver information for that kind of component.

Figure 23.9 shows an example of the DeviceMap subkey and the value entry for a selected device name.

Figure 23.9 A DeviceMap subkey showing the value entry for a serial mouse device

The value for each Device subkey describes an actual port name or the path for a Service subkey in HKEY_LOCAL_MACHINE\System\ControlSetnnn\Services, which contains information about a device driver. That Service subkey contains the information a system administrator might need for troubleshooting and is also the information presented about the device by Windows NT Diagnostics.

Figure 23.10 shows DeviceMap entries for a computer that has multiple SCSI adapters.

Figure 23.10 A DeviceMap subkey with value entries for multiple SCSI adapters

ResourceMap Subkey

The ResourceMap subkey under HKEY_LOCAL_MACHINE\Hardware maps device drivers to resources that the drivers use. Each ResourceMap subkey contains data reported by the device driver about its use of I/O ports, I/O memory addresses, interrupts, direct memory access (DMA) channels, and so on. The data in the ResourceMap subkey is volatile, meaning that the subkey is recreated each time you start Windows NT.

Under the ResourceMap subkey, there are DeviceClass subkeys for the general class (or type) of devices. Each of these subkeys contains one or more DriverName subkeys with information about a specific driver. For example, in Figure 23.11, Sermouse is the DriverName subkey under the PointerPort DeviceClass subkey. (The driver names in these subkeys match the services listed in HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services.)

Figure 23.11 A DeviceMap subkey showing the value entry for a device

OwnerMap Subkey

The OwnerMap subkey under HKEY_LOCAL_MACHINE\Hardware appears in the Registry only when certain types of device bus, such as a PCI device bus, are installed on the computer. The OwnerMap subkey contains operating system data to associate drivers of a specified type with devices of the same type on each installed bus. This subkey is new to Windows NT 4.0. Figure 23.12 shows a typical configuration of OwnerMap.

Figure 23.12 The OwnerMap subkey