Let’s check how to use PnPUtil Driver Manager to install drivers using the command prompt on Windows 10 and Windows 11 PCs. PnPUtil is the command-line tool for adding, installing, or deleting driver packages.
PnPUtil.exe is a command line utility that you can use to manage the driver store. That lets an administrator perform the following actions on driver packages including:
- Adding a driver package to the driver store.
- Installing a driver package on the computer.
- Deleting a driver package from the driver store.
- Enumerating 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 pack.
Driver packages are using the INF files for installing device drivers for hardware components. A setup information (INF) file is a text file in a driver package that contains all of the information that device installation components used to install a driver package on a device.
When a physical device is deployed without a driver for a device or missing or incompatible drivers, you may experience a question mark or error inside Device Manager; here, you can check to Fix Unknown Device Drivers in Device Manager.
- Best Guide for Dell Driver Management Using SCCM
- Easily Download SCCM Driver Package for Lenovo
- Easy Steps to Download HP Driver Packs for SCCM
Where to Get PnPUtil?
- Open a Command Prompt window (Run as administrator).
pnputil /?to view command options.
The PnPUtil command-line installs or manages drivers from the command line. You can use this command to add driver packages, remove driver packages, and list driver packages in the store.
It is designed to manage the driver on every version of Windows devices. The following are the supported PnPUtil command-line options.
PNPUTIL [/add-driver <...> | /delete-driver <...> |
/export-driver <...> | /enum-drivers |
/enum-devices [<...>] | /enum-interfaces [<...>] |
/disable-device <...> | /enable-device <...> |
/restart-device <...> | /remove-device <...> |
/scan-devices [<...>] | /?]
Let’s see how to use the PnPUtil tool for managing driver packages –
Add Multiple Driver Packages – PnpUtil Driver Manager
To add multiple driver packages from the folders, you can use the below command line –
/add-driver <filename.inf | *.inf> [/subdirs] [/install] [/reboot]
/subdirs – traverse subdirectories for driver packages.
/install – install/update drivers on any matching devices.
/reboot – reboot system if needed to complete the operation.
For example, I have downloaded the driver package from the manufacturer site that doesn’t include an installer application (like setup.exe or install.msi) and extracted the file.
Now I want to install the all drivers part of the package bundle, and the folder structure looks like this –
To add multiple packages, you can type the command. I have used the following command from Windows 11 and Windows 10 PCs. For Example:
Note: Make sure that you adjust the paths as per your environment.
pnputil /add-driver "C:\Users\jitesh\Desktop\5420\win10\*.inf" /subdirs /install /reboot
The process started running. Importing drivers may take a long time, especially if you are importing multiple driver packages. Once the process is completed, you will see the driver package added successfully with the total count at the end.
Add Individual Driver Package
To add individual driver packages from the folders, You can use the Setup Information file (.INF) to install the driver or use the PnpUtil driver manager utility from the command line manually.
Here you will have to provide the path or name to the INF file of the driver to be installed, and you can use the below command line –
pnputil /add-driver driverfilename.inf /install
Find .INF Name for Installed Device Driver
Every installed driver has an OEM number. Let’s check how you can retrieve the INF name for the installed drivers in the system. This method only works for INF files that are installed in the system.
It’s important to check the file name if you are required to install or uninstall a particular driver installed in your system.
- To open Device Manager. Type devmgmt.msc or hdwwiz.cpl into Run, and click on OK.
- Scroll and find the driver from the lists
- Double-click or Right-click on the Driver and select Properties.
- Switch to the Details tab and from the drop-down box under the Property tab, select Inf Name.
The value should show the inf name for this driver. For example, the value may look something like oem156.inf.
To match a driver in an INF file, You need to locate the INF files from (C:\Windows\INF). Next, Double click on the selected file, and it will be opened in Notepad as follows, looking at Abstract.
You will get to know the purpose of the drivers accordingly carefully you need to proceed to perform actions.
Command Line Option
Here’s how you can also use the command line to check the OEM number of the driver you want to delete –
pnputil.exe -e or pnputil.exe -e <INF name> where -e Specifies to enumerate all third-party INF files.
You will see the list of driver packages that are already installed in the driver catalog with the details, you need to look for the driver package which you want to delete or uninstall. For Example, The OEM number is located in the published name for individual installed drivers.
Delete or Uninstall Driver Package – PnpUtil Driver Manager
Let’s see how to Delete or Uninstall Driver Using the PnPUtil driver manager utility. You can specify the Setup Information file (.INF) of the driver to be uninstalled –
pnputil /delete-driver <oem#.inf> [/uninstall] [/force] [/reboot]
Delete driver package from the driver store.
/uninstall - uninstall driver package from any devices using it.
/force - delete driver package even when it is in use by devices.
/reboot - reboot system if needed to complete the operation.
Similarly, you can use PnPUtil to perform various operations. Here, the below table provides examples of how to use the PnPUtil driver management tool.
|Command line Syntax (Example)
|Add driver package
|pnputil /add-driver x:\driver.inf
|Add multiple driver packages
|pnputil /add-driver c:\oem*.inf
|Add and install driver package
|pnputil /add-driver device.inf /install
|Enumerate OEM driver packages
|Delete driver package
|pnputil /delete-driver oem0.inf
|Force delete driver package
|pnputil /delete-driver oem1.inf /force
|Export driver package
|pnputil /export-driver oem6.inf
|Export all driver packages
|pnputil /export-driver * c:\backup
|Disables device specified by device instance ID
|pnputil /disable-device “USB\VID_045E&PID_00DB\6&870CE29&0&1”
|Enables device specified by device instance ID
|pnputil /enable-device “USB\VID_045E&PID_00DB\6&870CE29&0&1”
|Restarts device specified by device instance ID
|pnputil /restart-device “USB\VID_045E&PID_00DB\6&870CE29&0&1”
|Removes device specified by device instance ID
|pnputil /remove-device “USB\VID_045E&PID_00DB\6&870CE29&0&1”
|Scan the system for any device hardware changes
|Enumerate only connected devices on the system
|pnputil /enum-devices /connected
|Enumerate device with specific instance ID
|pnputil /enum-devices /instanceid “ACPI\PNP0A08\1”
|Enumerate all devices with specific class
|pnputil /enum-devices /class Display
|Enumerate all devices with specific problem code
|pnputil /enum-devices /problem 28
|Enumerate all devices with problems and display hardware/compatible IDs
|pnputil /enum-devices /problem /ids
|Enumerate only enabled interfaces on the system
|pnputil /enum-interfaces /enabled
Here based on the parameters added to the command line, you can check the logs for additional information –
/delete-driver options were specified, check
%windir%\inf\setupapi.dev.log for more information.
/disable-device options were specified, set the SetupAPI log verbosity to full (
0x2000ffff) and re-attempt the operation. If it fails again, check