Deploying, managing, and troubleshooting devices and device drivers in Windows 7 requires knowledge of how device installation works, including the following concepts:
■ The driver store
■ Driver packaging
■ Driver staging vs. installation
■ Driver ranking
■ Driver signing
■ Tools for managing driver packages
NOTE The 64-bit versions of Windows Vista or later versions do not support 32-bit device drivers or 16-bit applications. For more information, see Knowledge Base article 946765, "A Description of the Differences Between 32-Bit Versions of Windows Vista and 64-Bit Versions of Windows Vista," found at http://support.microsoft.com/kb/946765.
Introduced in Windows Vista, the driver store is a central location where all driver files are stored before they are copied to their final destinations during device installation. The location of the driver store on a Windows Vista or later system is the following:
Driver files are stored in folders called driver packages, which are located within the FileRepository subfolder under the preceding path. For example, the driver package developed by Microsoft that contains core mouse support files is contained in the following folder:
%SystemRoot%\System32\DriverStore\FileRepository\msmouse . inf_3dfa3917
Within this folder are the driver (.sys) files, driver setup (.inf) files, Precompiled INF (.pnf) files, and an Extensible Markup Language (XML) manifest (.man) file that contains the manifest of all the files within the driver package. Together, all these files add up to the driver package, which contains all the files needed to install the device . To protect these driver files, the NTFS File System (NTFS) permissions on the driver store and all its subfolders and files is Full Control for the LocalSystem account and Read and Execute for the Everyone built-in identity
This central store and driver package architecture is different from Windows XP, where driver source files needed for installing devices are typically found in several locations, including the following:
■ %SystemRoot%\Driver Cache\I386\Drivers . cab
■ %SystemRoot%\Driver Cache\I386\Service_pack. cab (for example, Sp2 . cab)
■ . sys files under %SystemRoot%\System32\Drivers
■ Support dynamic-link libraries (DLLs) under %SystemRoot%\System32
■ Third-party co-installers in various locations
The following benefits result from maintaining a single, central store as an authoritative point from which to install driver files when new PnP devices are detected:
■ Allows for potentially faster device installations, more reliable driver rollback, and a single standard for uninstalling drivers
■ Allows you to protect drivers by using WRP
■ Uses index files to minimize the performance impact on installing devices when the driver store grows in size as a result of the addition of new packages
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:
1. Staging The process of adding driver packages to the driver store
2. 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 noninter-active 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 chapter 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 chapter.
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 . For more information on MDT 2010, see Part II, "Deployment."
Finally, you can stage driver packages by using Windows Automated Installation Kit 2 . 0 (Windows AIK 2. 0) to embed them in deployment images . For more information on Windows AIK 2 . 0, see Part II.
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.
Was this article helpful?