Manage Drivers Using PnPUnattend Command line Utility

Let’s check how to use PnPUnattend Command line Utility to install drivers on Windows 10 and Windows 11 PCs. It is the command-line tool for installing or updating drivers.

The pnpunattend.exe allows audits of a computer for device drivers, performs unattended driver installations, or searches for drivers without installing and, optionally, reports the results to the command line. Use this command to specify the installation of specific drivers for specific hardware devices.

HP, DellMicrosoft Surface, and Lenovo have done a fantastic job of providing technicians with driver cabs for use during deployment. This is often much better than any recovery media the device might ship with and is faster than downloading device drivers individually from a model’s product page.

Johan Arwidmark, Microsoft MVP, also shared his views on using PnPUnattend Command line Utility which is more reliable for installing a larger number of drivers and a bit faster than the PnPUtil driver management tool.

Patch My PC

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 more details FIX Unknown Device Drivers in Device Manager.

Install Drivers Using PnPUnattend Command line Utility

The pnpunattend command line utility is used to automate the installation of device drivers.

PnPUnattend.exe is also included in every version of Windows in the %windir%\system32 directory folder of all Windows 10 and Windows 11 installations, just like the PnPUtil utility.

  • Open a Command Prompt window (Run as administrator).
  • Type pnpunattend /? to view command options.
AuditSystem, Unattend online driver install

USAGE:
   PnPUnattend.exe [auditSystem | /help /? /h] [/s] [/L]
       auditSystem   Online driver install.
       /help /? /h    This help.
       /s             Search without installing.
       /L             Print Logging information to the command line.

To command shows how to use the PNPUnattend.exe to audit a computer for possible driver updates, and then report the findings to the command prompt, type:

Adaptiva
pnpunattend auditsystem /s /l
pnpunattend - Manage Drivers Using PnPUnattend Command line Utility
Manage Drivers Using PnPUnattend Command line Utility

Install Drivers using PnPUnattend Command line Utility

Let’s see how to use the PnPUnattend Command line utility tool for managing driver packages –

  • Create a directory for the drivers you want to install. For example, create a folder at C:\Drivers.
  • Download and extract the driver package for your device. Copy the contents of the subfolder that contains the INF file for your version of the operating system and any subfolders folder that you created.

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 at C:\Drivers.

Now I want to install the all drivers part of the package bundle, and the folder structure looks like this –

Drivers Package - Manage Drivers Using PnPUnattend Command line Utility
Drivers Package – Manage Drivers Using PnPUnattend Command line Utility
  • Create the following registry key, and then for the DriverPaths key you create, set the Value Data to 1.
REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\1" /v Path /t REG_SZ /d "C:\Drivers"

If you want to search for drivers without actually installing them, type the command below

pnpunattend auditsystem /s /l
Install Drivers - Manage Drivers Using PnPUnattend Command line Utility | PnPUnattend Command
Install Drivers – Manage Drivers Using PnPUnattend Command line Utility | PnPUnattend Command

Author

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.