Where Windows Searches for Drivers
After a device is attached, Windows attempts to locate a matching driver package from which it can install a driver for the device. Windows searches for driver packages from various locations and performs this search in two phases, 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|
Searching for driver packages
After a device is attached, Windows first attempts to locate and install a driver in a trusted system context without user interaction, as follows:
The best matching driver that already exists in the driver store is first installed onto the device, allowing the device to begin operation quickly. In parallel and in a different process, the following will happen:
Windows also searches for driver packages that were preloaded in the locations that are specified by the DevicePath registry value. This value is under the following subkey of the registry.
HKEY_LOCAL_MACHINE Software Microsoft Windows CurrentVersion
By default, the DevicePath value specifies the %SystemRoot%\INF directory.
If a better matching driver package than was initially installed is found either on Windows Update or in a location that is specified by the DevicePath value, Windows first stages the driver package to the driver store before the driver is installed. In this way, Windows always installs drivers from the driver store.