PnPutil.exe can be used for online staging of driver packages on Windows 7 systems. This procedure is known as online servicing of Windows. PnPutil.exe supersedes the DevCon.exe tool for managing device drivers on earlier versions of Windows. You can run PnPutil.exe to add, remove, and enumerate PnP drivers from a Command Prompt window, or you can script it for batch operations.
The following examples use PnPutil.exe to perform various actions against the driver store. For the full syntax of this command, type pnputil /? at an elevated command prompt.
- pnputil -a a:\usbcam.inf Adds the package specified by Usbcam.inf into the driver store. This command requires you to run PnPutil.exe with administrator credentials but does not require that the device be connected to the computer.
- pnputil -a path_to_INF_files\*.inf Stages multiple drivers using a single command or script. You must first place all driver packages into the central directory referenced in the command.
- pnputil -e Enumerates all packages that have been published (staged) in the driver store. If no third-party drivers are published, it will return the error "No published driver packages were found on the system."
- pnputil.exe -d INF_name Deletes the specified package from the driver store, provided that no currently installed device is using the driver. This command also purges the index of any reference to the driver package being removed. Note that this INF_name is the "published" name of a third-party package in the driver store, as returned by the pnputil -e command. This command requires you to run Pnputil.exe with administrator credentials.
- pnputil.exe -f -d INF_name Forcibly deletes the specified driver package. (You can use this if necessary to remove a package associated with a device that is physically installed in the system or when using -d alone returns an error accessing the package. However, this is not recommended because doing this causes problems for the device[s] that are still left referencing the driver package that was forcibly removed.) Note that this INF_name is the "published" name of a third-party package in the driver store, as returned by the pnputil -e command. This command requires you to run Pnputil.exe with administrator credentials.
Sample output from enumerating staged drivers on a Windows 7 computer might look like this.
C:\Users\tallen>pnputil -e Microsoft PnP Utility Published name : oem0.inf Driver package provider : Microsoft Class : Printers Driver date and version : 06/21/2006 6.1.7100.0 Signer name : Microsoft Windows Published name : oem1.inf Driver package provider : NVIDIA Class : Network adapters Driver date and version : 05/03/2007 65.7.4 Signer name : Microsoft Windows Hardware Compatibility Publisher
Note that when using pnputil -a to stage multiple drivers using a single command or script, the command or script can sometimes halt before finishing. This can occur if either of the following conditions is true:
- The driver package is incomplete or damaged.
- The driver paths in the INF span multiple media.
If this problem occurs, troubleshoot the issue by stepping through the command or script to identify the problem driver and replace it with an updated driver designed for Windows 7.
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