INF File Entry Values That Modify Device Properties before Windows Vista
The following are the INF file entry values that modify device properties on Windows Server 2003, Windows XP, and Windows 2000:
INF file entry values that set device properties that correspond to the system-defined device properties that are part of the unified device property model in Windows Vista and later versions of Windows.
INF AddReg directives and INF DelReg directives that set or delete system-defined registry entry values that correspond to the system-defined device properties that are part of the unified device property model in Windows Vista and later versions.
INF AddReg directives and INF DelReg directives that set or delete custom registry entry values that correspond to custom device properties.
For general information about the INF file sections that install device instances, device setup classes, device interface classes, and device interfaces, see the following topics:
- INF DDInstall Section
- INF ClassInstall32 Section
- INF InterfaceInstall32 Section
- INF DDInstall.Interfaces Section
INF File Entry Values That Correspond to System-Defined Device Properties
Some INF file entry values provide information that Windows uses to set the system-defined registry entry values that correspond to device instance properties and device interface properties. The following are a few examples of registry entry values that are supplied by such INF file entry values:
The INF Models section of an INF file includes a device-description entry value. This value corresponds to the DEVPKEY_Device_DeviceDesc property in the unified device property model and can be retrieved by calling CM_Get_DevNode_Registry_Property with a ulProperty parameter of CM_DRP_DEVICEDESC or by calling SetupDiGetDeviceRegistryProperty with a Property parameter of SPDRP_DEVICEDESC.
The INF Class directive of an INF Version section includes a class-name entry value that supplies the name of a device setup class. This value corresponds to the DEVPKEY_DeviceClass_ClassName property in the unified device property model. The class name for a device setup class can be retrieved by calling SetupDiClassNameFromGuid, and the class name of a device instance can be retrieved by calling CM_Get_DevNode_Registry_Property with a ulProperty parameter of CM_DRP_CLASS or by calling SetupDiGetDeviceRegistryProperty with a Property parameter of SPDRP_CLASS.
The INF InterfaceInstall32 section includes an InterfaceClassGuid entry value that supplies the GUID of a device interface. This value corresponds to the DEVPKEY_DeviceInterface_ClassGuid property in the unified device property model. The GUID of a device interface can be retrieved by calling SetupDiEnumDeviceInterfaces, which retrieves an SP_DEVICE_INTERFACE_DATA structure for the device interfaces that are associated with a device instance. The InterfaceClassGuid member of the SP_DEVICE_INTERFACE_DATA structure identifies the interface class GUID.
INF AddReg Directives and INF DelReg Directives That Modify System-Defined Device Properties
Many system-defined device properties have corresponding system-defined registry entry values. For device properties that have corresponding registry entry values, using an INF AddReg directive to add the corresponding registry entry value sets the corresponding device property. Similarly, using an INF DelReg directive to delete the corresponding registry entry value, also deletes the corresponding device property.
For example, the INF AddReg directive in the following "Abc_Device_Install.HW" section would set the DeviceCharacteristics registry entry value for a device instance:
[Abc_Device_Install.HW]
...
AddReg = Xxx_AddReg
...
[Xxx_AddReg]
...
[HKR,,DeviceCharacteristics,0x10001,0x00000001
]
The DeviceCharacteristics registry entry value corresponds to the DEVPKEY_Device_Characteristics property in the unified device property model in Windows Vista and later versions of Windows.
INF AddReg Directives and INF DelReg Directives That Modify Custom Registry Entry Values
Windows manages the correspondence between system-defined registry entry values and system-defined device properties. However, Windows does not manage the correspondence between custom registry entry values and custom device properties. An INF AddReg directive or an INF DelReg directive that modifies a custom registry entry value does not affect the system-defined properties that Windows manages.
Custom device instance properties that are set as shown in the following example, can be retrieved by calling SetupDiGetCustomDeviceProperty.
[XxxDDInstall.HW]
...
AddReg = Xxx_AddReg
...
[Xxx_AddReg]
...
[HKR,,CustomPropertyName,0x10001,0x00000001
]
For more information about how to access custom device properties that have corresponding custom registry entry values, see Accessing Custom Device Properties.