After a new device is detected and identified, Windows and its device installation components follow these steps:
- Windows searches for an appropriate driver package for the device. For more information about this step, see Searching for the Driver Package.
- Windows selects the most appropriate driver for the device from one or more driver packages. For more information about this step, see Selecting the Driver.
Using the hardware identifier (ID) that is reported by the bus or hub driver, Windows searches for driver packages that match a device. A driver package matches a device if the hardware ID matches a hardware ID or compatible ID in an INF Models section entry of the driver package's INF file.
Depending on the operating system version, Windows searches for matching driver packages in various locations as described in the following table.
|Search phase||Windows 7||Windows 8 and later versions of Windows|
|Before a driver is installed||
|After initial driver is selected||
For example, if a user plugs a wireless local area network (WLAN) adapter into a port of a USB hub on a computer that is running Windows 7, the following steps occur:
The device installation process searches for a matching driver package from one of the following locations:
The Universal Naming Convention (UNC) paths that are identified by the DevicePath registry value of HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion.
The distribution medium that the independent hardware vendor (IHV) provided for the device.
If a driver package is found, Windows stages the package into the driver store from which the driver for the device will be installed.
Note Starting with Windows Vista, the operating system always installs a driver package from the driver store. If a matching driver package is found in another location, Windows first stages the package to the driver store before it installs the driver for the device.
As another example, if a user plugs a WLAN adapter into a port of a USB hub on a computer that is running Windows 8, the following steps occur:
After the USB hub driver creates a hardware ID for the WLAN adapter, Windows first searches the driver store for a matching driver package for the device. If a driver package is found in the driver store, Windows installs it on the device. This allows the device to begin working quickly.
In a separate process, Windows searches Windows Update and the DevicePath for a better matching driver than was installed. If one is found, the driver is staged into the driver store, and then installed onto the device.
Selecting the Driver
As soon as Windows has found one or more matching driver packages for the device, Windows selects the best driver by following these steps:
If Windows has found only one matching driver package, it installs the driver from that package for the device.
If Windows has found multiple matching driver packages, Windows first assigns a ranking value to the driver from each driver package. If only one driver has the lowest rank value, it installs the driver from that package for the device.
For more information about the ranking process, see How Windows Ranks Drivers.
If multiple drivers have the same lowest rank value, Windows uses the following criteria to select the best driver for the device:
Whether the driver is digitally signed. Starting with Windows Vista, Windows always selects a signed driver instead of an unsigned driver regardless of other selection criteria. For more information about digital signatures for drivers, see Driver Signing.
Once Windows has selected a driver for the device, Windows installs the driver as described in Step 3: The Driver for the Device is Installed.
For more information about how drivers are selected for a device, see How Windows Selects Drivers.