Overview of Registry Trees and Keys

This section contains the following topics which describe the use of registry keys for device and driver installation:

Overview of Registry Keys

HKLMSYSTEMCurrentControlSetServices Registry Tree

The HKLMSYSTEMCurrentControlSetServices registry tree stores information about each service on the system. Each driver has a key of the form HKLMSYSTEMCurrentControlSetServicesDriverName. The PnP manager passes this path of a driver in the RegistryPath parameter when it calls the driver’s DriverEntry routine. A driver can store global driver-defined data under its key in the Services tree. Information that is stored under this key is available to the driver during its initialization.

HKLMSYSTEMCurrentControlSetControl Registry Tree

The HKLMSYSTEMCurrentControlSetControl registry tree contains information for controlling system startup and some aspects of device configuration.

HKLMSYSTEMCurrentControlSetEnum Registry Tree

The HKLMSYSTEMCurrentControlSetEnum registry tree contains information about the devices on the system. The PnP manager creates a subkey for each device, with a name in the form of HKLMSYSTEMCurrentControlSetEnumenumeratordeviceID. Under each of these keys is a subkey for each device instance present on the system. This subkey, which is known as the device’s hardware key (or, device key), has information such as the device description, hardware IDs, compatible IDs, and resource requirements.

HKLMSYSTEMCurrentControlSetHardwareProfiles Registry Tree

The HKLMSYSTEMCurrentControlSetHardwareProfiles registry tree contains information about the hardware profiles on the system.

RunOnce Registry Key

All versions of Windows support a registry key, RunOnce, which can be used to specify commands that the system will execute one time and then delete.

· Immediately after a device has been installed, Setup executes the command stored under the RunOnce key and then removes the key.

· Additionally, each time the system starts, it executes the command stored under the RunOnce key and then removes the key. Therefore, if you put a command under the RunOnce key, you cannot easily predict when it is executed.

· You can prefix a RunOnce key value parameter with an exclamation point (!) to defer deletion of the key until after the command runs successfully.

· Without the exclamation point prefix, if the specified command fails, the RunOnce key will still be deleted and the command will not be executed the next time that the system starts.

· Also, by default, the RunOnce keys are ignored when the system is started in Safe Mode. The value parameter of RunOnce keys can be prefixed with an asterisk (*) to force the command to be executed even in Safe Mode.

·

DeviceOverrides Registry Key

Leave a Reply

Your email address will not be published. Required fields are marked *