PnPUtil Command Syntax
To run PnPUtil, open a Command Prompt window (Run as Administrator) and type a command using the following syntax and parameters.
Note PnPUtil (PnPUtil.exe) is included in every version of Windows, starting with Windows Vista (in the %windir%\system32 directory).
PnPUtil [/a [/i] InfFileName] [/d [/f] PublishedInfFileName] [/e] [/?]
Adds a driver package to the driver store. The InfFileName parameter specifies the path and name of the INF file in the driver package. For more information about this parameter, see the Comments section later in this topic.
The /a switch has the following optional parameters:
Note When you add a driver package to the driver store by using the /a switch, Windows uses a different name (published name) for the driver package's INF file. You must use the published name of the INF file for the PublishedInfFileName parameter of the /d switch.
Removes a driver package from the driver store. The PublishedInfFileName parameter specifies the published name of the INF file for the driver package that was added to the driver store. For more information about this parameter, see the Comments section later in this topic.
The /d switch has the following optional parameters:
Forces the deletion of the specified driver package from the driver store. You must use this parameter if the specified driver package is installed on a device that is connected to the system. If this parameter is not specified, PnPUtil only removes a driver package if it was not used to install drivers for devices that are connected to the system.
Note Removing the driver package in this manner will not affect the operation of currently connected devices for which drivers were previously installed from the package.
Enumerates the driver packages that are currently in the driver store. Only driver packages that are not in-box packages are listed. An in-box driver package is one which is included in the default installation of Windows or its service packs.
Displays the command-line syntax.
Filename can specify one of the following:
- The name of a single INF file.
- The names of all INF files or only specific INF files by using the asterisk ('*') or question mark ('?') wildcard characters.
If you delete a driver package by using the /d switch, you must specify the published name of the INF file through the PublishedInfFileName parameter. You can obtain this name through one of the following methods:
- When the driver package is added to the driver store through the /a switch, PnPUtil displays the published name of the INF file for the driver package within the driver store.
- Run PnPUtil and use the /e switch to list all the driver packages, together with the published names of their INF files, that are currently within the driver store.
C:\>pnputil /e Microsoft PnP Utility Published name : oem0.inf Driver package provider : Microsoft Class : Printers Driver version and date : Unknown driver version and date Signer name : microsoft windows Published name : oem22.inf Driver package provider : Fabrikam, Inc. Class : Network adapters Driver version and date : 10/07/2009 22.214.171.124 Signer name : microsoft windows hardware compatibility publisher