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.
In this tutorial:
- Managing Devices and Services
- Understanding Device Installation and Management
- Device Enhancements in Windows 7
- Display Enhancements in Windows 7
- Understanding Device Installation
- Driver Store and Driver Packaging
- Driver Staging vs Installation
- Driver Staging and Installation Process
- Detailed Installation Process
- Managing Driver Packages
- Using PnPutil.exe
- Using Dism.exe
- Driver Signing
- Driver Ranking
- Installing and Using Devices
- Enhancements to the Device Installation Experience in Windows 7
- Scenario 1: Driver found in Driver Store
- Scenario 2: Driver found on Windows Update
- Scenario 3: Driver in Driver Store, But Better Driver on Windows Update
- Scenario 5: No Driver Can Be Found for the device
- Scenario 6: Vendor -supplied media is available
- Scenario 7: Additional Device Software is Available For Download from vendor
- Configuring Device Installation Settings
- Using the Devices And Printers Folder
- Understanding Device Stage
- Understanding the Device Experience Architecture
- Device Containers
- Device display object
- Device Metadata System
- Managing Device Installation Using Group Policy
- Managing Device Installation Behavior
- Managing Driver Installation Behavior
- Blocking Installation of Removable Devices
- Managing Device Redirection Behavior
- Troubleshooting Device Installation
- Using Windows Error Reporting
- Using the SetupAPI Log File
- Using Driver INF Files
- Using Device Manager Error Codes
- Using Driver Verifier
- Repairing Driver Store Corruption
- Repairing Index File Corruption
- Understanding Power Management
- Power Management Enhancements in Windows 7
- New Power Policies in Windows 7
- Configuring Power Management Settings
- Configuring Power Management Settings Using the Power Options Utility in Control Panel
- Configuring Power Management Settings Using Group Policy
- Configuring Power Management Settings Using the Powercfg Utility
- Understanding Services
- Service Enhancements in Windows 7
- Managing Services
- Managing Services Using Task Manager
- Managing Services Using the Sc.exe Command