In Windows XP the driver rankings were determined in the following way as discussed in the "Windows Vista Resource Kit":
- In-box drivers are given first preference.
- Windows Hardware Quality Labs (WHQL) signed drivers next.
- Unsigned drivers are given lowest preference.
In Vista this algorithm was extended to include eight levels of digital signing:
- Microsoft signed WHQL Certified Drivers.
- Microsoft signed in-box drivers (NT Build Lab Certified).
- Microsoft signed Windows Sustained Engineering Certified drivers.
- Drivers that have been signed using Authenticode (Enterprise CA).
- Drivers that have been signed using Authenticode (Class 3 CA Certified).
- Drivers that have been signed using Authenticode (MAKECERT.EXE Certified).
- Microsoft signed WHQL Certified drivers for a down level Windows Operating system.
- Unsigned Drivers.
This behavior is illustrated in setupapi.dev.log when determining which driver to install for a device. Further considerations for which version of a driver should be installed for a particular device is:
- How closely the PNPID of the device matches the PNPID of the driver.
- How recent the driver is compared to other suitable drivers.
- The driver version.
- According to this link, we also use driver feature to help rank a driver for best match.
(Note: Date and Version are only considered if every other aspect of the driver rank is equal. Setup assigns the best signature score (lowest signature score value) to drivers that have a Microsoft signature for Windows Vista. All Microsoft signatures are assigned this best signature score. All else being equal in a driver rank, Setup will select the driver that is the best match from among those that have a Microsoft signature for Windows Vista.)
Knowing these algorithms can help you troubleshoot device driver issues regardless of how the driver was installed (i.e. in-box, third party). The best source of data for which driver was chosen as the "best match" is by reading the setupapi.dev.log file.
A good article on troubleshooting using the setupapi.dev.log can be found here:
Windows XP, Windows Vista, Drivers, PNP