Windows Driver Kit: Device Installation
How Setup Selects Drivers

This section describes how Setup locates and selects a function driver for a Plug and Play (PnP) device.

Setup represents a driver as a driver node, which includes all the software support for a device, such as any services, device-specific co-installers, and registry entries. The services for a device include a function driver and any upper-level and lower-level device filter drivers.

Some devices require a vendor-supplied driver that is designed specifically for that device. Other devices can be operated by a vendor-supplied driver that is designed to support a family of devices. However, other devices can be driven by a system-supplied driver that supports all the devices of a given device setup class. Setup selects the driver that it determines is the most specific match to a device. If Setup does not find such a driver, it selects from increasingly more general drivers.

Setup searches only in specific locations for drivers that match a device. A driver matches a device if one of the Plug and Play (PnP) device identification strings that is reported by the bus driver for the device matches a device identification string in an INF Models section entry of the driver INF file. For more information about where Setup searches for matching drivers, see Where Setup Searches for Drivers.

Setup creates a list of all the matching drivers that it finds and assigns each driver a rank. Setup represents the rank of driver by an integer value, greater than or equal to zero, where the lower the value, the better the driver match to a device. Setup selects the driver, with the lowest rank value, as the best match for the device. For information about how Setup ranks drivers, see How Setup Ranks Drivers (Windows Vista and Later) or How Setup Ranks Drivers (Windows Server 2003, Windows XP, and Windows 2000).

By default, if there are more than one equally ranked drivers that are a best match for a device, Setup uses the following additional criteria to select a driver: the driver date and the driver version, where the date and version are specified by the INF DriverVer directive that is contained in the driver INF file; and whether the driver is signed. The following lists how these criteria are applied to select a driver for a device,

  • Setup selects the driver that has the lowest rank value as the best match for the device.
  • For drivers that have equal rank, Setup selects the driver that has the most recent date.
  • For the drivers that have equal rank and date, Setup selects the driver that has the highest version.
  • (Windows XP SP1 and later) For drivers that have equal rank, date, and version, Setup can select any driver.
  • (Windows XP and Windows 2000) For drivers that have equal rank, date, and version, Setup can select any driver.

    In addition, for Windows 2000 only, Setup selects the driver that has the most recent date only if the driver package is signed. Otherwise, Setup does not use the DriverVer entries and uses a default date of 00/00/0000.

In addition to the default criteria that Setup uses to rank and select a driver, class installers and class co-installers can also participate in driver selection and ranking as described in Installer Driver Selection and Ranking.

Finally, starting with Windows Vista, Setup ranks drivers in the following way:

  • If the AllSignersEqual group policy is disabled, Setup ranks drivers that are signed with a Microsoft signature higher than drivers that are signed with an Authenticode signature. This ranking occurs even if a driver that is signed with an Authenticode signature is, in all other aspects, a better match for a device.
  • If the AllSignersEqual group policy is enabled, Setup ranks all digitally signed drivers equally.

Note  Starting with Windows 7, the AllSignersEqual group policy is enabled by default. In Windows Vista and Windows Server 2008, the AllSignersEqual group policy is disabled by default.

IT departments can override the default ranking behavior by enabling or disabling the AllSignersEqual group policy.

Signatures from a Windows signing authority include the following:

  • Premium WHQL signatures and standard WHQL signatures
  • Signatures for in-box drivers
  • Windows Sustained Engineering (Widows SE) signatures
  • A WHQL signature for a Windows version that is the same or later than the LowerLogoVersion value of the driver’s device setup class


Send feedback on this topic
Built on November 19, 2009
Page view tracker