The Command Prompt is one utility that many of the power users love to use and have grown with it. If you did not know, but it is possible to run Windows Update from the command line. Similarly, it is also possible to update drivers using the Command Prompt.
Microsoft offers a built-in utility PnPUtil.exe that allows an administrator to add a driver package, install or update and delete a driver package from the driver store. You can also find out the list of driver packages currently installed in the driver store. In this post, we will show how you can upload drivers using the Command Prompt.
If you want to check you have it, all you need to do is open the command prompt and type PNPUtil.exe and press the Enter key. If there is no error, you are good to go.
Update Drivers using Command Prompt
This method will not download the driver package from the internet. You will have to download the package from the OEM website or copy it from USB or storage media, and copy it to the computer.
Once done, you can then use the driver with the utility to install or update the driver. You will have to provide the path to the INF file which holds information of the driver to be installed.
pnputil [/add-driver <...> | /delete-driver <...> | /export-driver <...> | /enum-drivers | /disable-device <...> | /enable-device <...> | /restart-device <...> | /remove-device <...> | /scan-devices <...> | /enum-devices <...> | /enum-interfaces <...> | /?]
Here is the syntax, as stated in microsoft.com:
pnputil /add-driver * <filename.inf | .inf> [/subdirs] [/install] [/reboot] /subdirs - traverse sub directories for driver packages. /install - install/update drivers on any matching devices. /reboot - reboot system if needed to complete the operation.
Examples of using the PnPUtil command
You can use the /install option to install a new driver or update an existing one.
Add driver package
pnputil /install x:\driver.inf
Add multiple driver packages
pnputil /install c:\oem\*.inf
Add and install the driver package
pnputil /install device.inf /install
That said, the utility can return information, which can suggest if a reboot is required. If you do not get anything or a zero, all is well. However, if you get
ERROR SUCCESS REBOOT REQUIRED (3010) then a system reboot is required. It happens when the reboot is not used during installation or update. In case a restart is needed, then you will receive
ERROR SUCCESS REBOOT INITIATED (1641) which means the update was successful, and the system reboot is underway.
The utility can also find or enumerates the driver packages that are currently in the driver store. However, it will only list driver packages that are not in-box packages are listed. An in-box driver package is one that is included in the default installation of Windows or its service packs.
There is another command called Drvload, but it only works in the Windows PE environment, so from a consumer or admin perspective, you will have to use the PnPUtil to update or install a new driver in Windows 11/10.