Click to Rate and Give Feedback

  Switch on low bandwidth view
Windows Driver Kit: Device Installation
How Setup Ranks Drivers (Windows Vista and Later)

Setup assigns a rank to a driver that matches a device. The rank indicates how well the driver matches the device. A driver rank is represented by an integer that is equal to or greater than zero. The lower the rank, the better a match the driver is for the device.

The rank of a driver is a composite value that depends on how a driver is signed, the features that are supported by the driver, and the type of match between the device identification strings that are reported by a device and the device identification strings that are specified in the entries of an INF Models section of a driver INF file.

A rank is represented by a value of type DWORD and the value of the SP_DRVINSTALL_PARAMS.Rank member for a driver. A rank is sum of a signature score, a feature score, and an identifier score. A rank is formatted as 0xSSGGTHHH, where S, G, T, and H are four-bit fields and the SS, GG, and THHH fields represent the three ranking scores, as follows:

  • The signature score ranks a driver according to how a driver is signed. The signature score depends only on the value of the SS field. An unspecified signature score is represented as 0xSS0000000.

    For an overview on how Windows Vista and later versions of Windows use a driver’s signature to determine how the driver is installed, see Signature Categories and Driver Installation.

  • The feature score ranks a driver based on the features that the driver supports. The feature score depends only on the value of the GG field. An unspecified feature score is represented as 0x00GG0000.
  • The identifier score ranks a driver based on the type of match between a device identification string that is reported by a device and a device identification string that is listed in an entry of an INF Models section of a driver INF file. The identifier score depends only on the value of the THHH field. An unspecified identifier score is represented as 0x0000THHH.

For a summary of valid driver ranks and their examples, see Driver Rank Ranges (Windows Vista and Later) and Driver Rank Example (Windows Vista and Later).

For information about the system-defined constants that can be used to extract and compare rank values, see System-Defined Driver Rank Constants (Windows Vista and Later).

For information about entries in the SetupAPI log that indicate the rank of a driver and the type of driver signature, see Driver Rank Information in the SetupAPI Log.


Send feedback on this topic
Built on May 20, 2009
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
And there is no easy method (except DriverPath) to distinguish between XP and Vista      cscope   |   Edit   |   Show History

I would like to know why the good folks at MS did not simply add an ID string along the lines of 'I am a Vista .inf' or 'I am an XP .inf'. Instead mayhem has eventuated as thousands of .inf files designed for Vista can't be read by XP and vice versa, and yet both must exist on the install CD. Do a simple search for 'missing section', and you'll see what I mean. The ranking system does not distinguish between Vista and XP.

We have found the only way is to make the Vista .inf newer than the XP inf, and to use DriverPath (which is not understood by Vista) to point at the directory where the XP inf lives.

Given the problem of multiple .inf files, why does the installer not simply show all of them to the user? We have labelled ours XP inf and Vista inf, and so the user knows exactly what to do. Instead, the user gets no look in, and the wrong .inf file is installed instead. Then the poor user gets lot's of grief.

Silly silly Microsoft!

Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker