Windows 7 / Getting Started

Driver Staging vs Installation

When the PnP service detects a new device in Windows XP, the driver files are extracted from .cab files found under %SystemRoot%\Driver Cache\I386, from .cab files on vendor-supplied media, or directly from Windows Update. The files are then copied to different locations as required to install the drivers and enable the device. Installing a device on Windows XP works like this: You connect the device, the PnP service detects it, and then Windows searches the driver search path for a suitable driver and installs the device. In Windows XP, therefore, the device has to be present on (or connected to) the system for device driver installation to occur. Beginning with Windows Vista, however, device installation takes place in two distinct steps:

  • Staging The process of adding driver packages to the driver store
  • Installation The process of installing drivers from the driver store when the PnP service detects a device

Driver staging is performed under the LocalSystem security context. Adding driver packages to the driver store requires administrative privileges on the system. During driver staging, driver files are verified, copied to the store, and indexed for quick retrieval, but they are not installed on the system. The staging process verifies the driver packages against the following criteria to ensure that the drivers will not destabilize the system when they are installed later:

  • The driver package must be complete and contain all files needed to install the device. This means that the INF file for the device must specify all the files needed during driver installation, and all those files must also be present.
  • When drivers are installed, they cannot display any interactive user mode prompts or require any software-first installation facilities because Windows Vista and later versions require all device drivers to be installed under the noninteractive LocalSystem security context.
  • PnP device driver files must be able to be installed in their entirety under the noninteractive LocalSystem security context. If the driver installation routine attempts to display any interactive user interface (UI) elements, installation will hang, timing out after five minutes. The user will be prompted to specify the location of new drivers for the device. (You can use Group Policy to modify the default device installation time-out value-see the section titled "Managing Device Installation Behavior" later in this tutorial for more information.)
  • The INF files and other driver files must not have been tampered with or modified. The integrity of the driver files is verified by the PnP service.
  • The driver must not be listed on the known bad drivers list, which is maintained within a DLL on the system and cannot be modified.

If the driver package fails any of these criteria, staging of the package to the driver store will fail (except in the case of the third bullet item in the preceding list). This prevents Windows from being destabilized and possibly crashing when the user attempts to install the device requiring the package. Staging failure, however, has no impact on the system-it simply means that the package is not added to the store.

The device does not need to be present on (or connected to) the system when its driver package is being staged. Driver packages can be staged from media (CD, DVD, and so on) or from network locations. Windows Vista comes with numerous in-box drivers that are staged during Windows Setup so that they can be available for device installs when the user first logs on to the system. Beginning with Windows 7, however, the number of in-box device drivers has been reduced considerably because of the inclusion of Windows Update in the default device path. For more information about this change, see the section titled "Enhancements to the Device Installation Experience in Windows 7" later in this tutorial.

Third-party driver packages can be staged in two ways:

  • When the device is connected, by using vendor-supplied media and the Add New Hardware Wizard. (The Add New Hardware Wizard is for devices not recognized by PnP.)
  • When the device is disconnected, by using staging tools such as PnPutil.exe or DrvLoad.exe. In addition, many device vendors are likely to provide .exe files that will stage drivers to the driver store.

You can also stage driver packages on Windows 7 by using the Microsoft Deployment Toolkit 2010 (MDT 2010). Using MDT 2010, an administrator can stage new drivers with simple drag-and-drop operations. In addition, you can group drivers so that they can be targeted to specific makes and models of computers that require them.

Finally, you can stage driver packages by using Windows Automated Installation Kit 2.0 (Windows AIK 2.0) to embed them in deployment images.

Note There is no hard-coded limit on the size to which the driver store can grow as new driver packages are staged. The driver store uses index files that are updated during stages to minimize the performance impact on installation time as the driver store grows in size.

[Previous] [Contents] [Next]

In this tutorial:

  1. Managing Devices and Services
  2. Understanding Device Installation and Management
  3. Device Enhancements in Windows 7
  4. Display Enhancements in Windows 7
  5. Understanding Device Installation
  6. Driver Store and Driver Packaging
  7. Driver Staging vs Installation
  8. Driver Staging and Installation Process
  9. Detailed Installation Process
  10. Managing Driver Packages
  11. Using PnPutil.exe
  12. Using Dism.exe
  13. Driver Signing
  14. Driver Ranking
  15. Installing and Using Devices
  16. Enhancements to the Device Installation Experience in Windows 7
  17. Scenario 1: Driver found in Driver Store
  18. Scenario 2: Driver found on Windows Update
  19. Scenario 3: Driver in Driver Store, But Better Driver on Windows Update
  20. Scenario 5: No Driver Can Be Found for the device
  21. Scenario 6: Vendor -supplied media is available
  22. Scenario 7: Additional Device Software is Available For Download from vendor
  23. Configuring Device Installation Settings
  24. Using the Devices And Printers Folder
  25. Understanding Device Stage
  26. Understanding the Device Experience Architecture
  27. Device Containers
  28. Device display object
  29. Device Metadata System
  30. Managing Device Installation Using Group Policy
  31. Managing Device Installation Behavior
  32. Managing Driver Installation Behavior
  33. Blocking Installation of Removable Devices
  34. Managing Device Redirection Behavior
  35. Troubleshooting Device Installation
  36. Using Windows Error Reporting
  37. Using the SetupAPI Log File
  38. Using Driver INF Files
  39. Using Device Manager Error Codes
  40. Using Driver Verifier
  41. Repairing Driver Store Corruption
  42. Repairing Index File Corruption
  43. Understanding Power Management
  44. Power Management Enhancements in Windows 7
  45. New Power Policies in Windows 7
  46. Configuring Power Management Settings
  47. Configuring Power Management Settings Using the Power Options Utility in Control Panel
  48. Configuring Power Management Settings Using Group Policy
  49. Configuring Power Management Settings Using the Powercfg Utility
  50. Understanding Services
  51. Service Enhancements in Windows 7
  52. Managing Services
  53. Managing Services Using Task Manager
  54. Managing Services Using the Sc.exe Command