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 phaseWindows Server 2003, Windows XP, and Windows 2000Windows Vista and Windows Server 2008Windows 7 and later versions of Windows
Without user interactionDevicePath Driver store

Windows Update

Driver store

DevicePath

With user interaction

Prompt for distribution media

Windows Update

DevicePath

Windows Update

Prompt for distribution media

Not applicable

 

Searching for driver packages without user interaction

After a device is attached, Windows first attempts to locate and install a driver in a trusted system context without user interaction, as follows:

  • Starting with Windows 7, Windows automatically downloads matching driver packages from Windows Update without prompting the user for permission. If a matching driver package is found, Windows downloads the package and stages it to the driver store.

    If a matching driver package cannot be downloaded, Windows searches for matching driver packages in the driver store. This includes in-box drivers, installed drivers other than in-box drivers, and preinstalled drivers.

    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 matching driver package 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.

  • For Windows Vista and Windows Server 2008, the driver package must be installed in the driver store. This includes inbox drivers, installed drivers other than in-box drivers, and preinstalled drivers.

  • For Windows Server 2003, Windows XP, and Windows 2000, the INF file must be preloaded in a location that is specified by the DevicePath registry value.

Note  The INF file for these driver packages that are installed without user interaction cannot specify the InteractiveInstall flag in the INF ControlFlags section.

Searching for driver packages with user interaction

If Windows cannot locate a driver that can be installed without user interaction in a trusted system context, it starts the Found New Hardware Wizard. This wizard attempts to locate and install a driver in the interactive context of an administrator, as follows:

  • For Windows Vista and Windows Server 2008, Windows first searches for driver packages that were preloaded in the Universal Naming Convention (UNC) paths that are specified by the DevicePath registry value. If a matching driver package is found 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.

    If a matching driver package was not found and the user has enabled connecting to Windows Update to download matching drivers, the Found New Hardware Wizard accesses Windows Update to download matching drivers without displaying a wizard page. If the user has configured Windows Update to ask every time that a new device is connected, Windows displays a wizard page that prompts the user for permission to access Windows Update to download matching drivers. The Found New Hardware Wizard also searches for drivers that were preloaded in the locations that are specified by the DevicePath registry value.

  • For Windows Server 2003, Windows XP, and Windows 2000, the Found New Hardware Wizard prompts the user for a distribution medium and attempts to locate matching drivers on the medium. In addition to searching for matching drivers on the distribution medium, the Found New Hardware Wizard also searches for matching drivers that were preloaded in the locations that are specified by the DevicePath registry value.

    On Windows Server 2003 and Windows XP SP2, if the user has enabled connecting to Windows Update to locate matching drivers, the wizard also attempts to access Windows Update to download matching drivers. If the user has configured Windows Update to ask every time that a new device is connected, Windows displays a wizard page that prompts the user for permission to access Windows Update to download matching drivers. On Windows XP SP1, Windows XP, and Windows 2000, the Found New Hardware Wizard automatically attempts to access Windows Update to download matching drivers.

Note  Starting with Windows 7, Windows no longer installs a driver in the interactive context of an administrator. As a result, Windows does not start the Found New Hardware Wizard to locate and install a driver for a new device.

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft