How to add/remove device driver from command-line on Windows

Windows operating system contains a tool that allows manipulation with system drivers stored in .INF and .CAT files. The operation requires Administrator privileges.

Command to install the driver:

pnputil /add-driver my-driver.inf /install

The correct installation display the following result:

Microsoft PnP Utility

Adding driver package:  my-driver.inf
Driver package added successfully.
Published Name:         oem3.inf

Total driver packages:  1
Added driver packages:  1

To verify the result you can plug the device and it should pick the correct driver. The system copied content from my-driver.inf to C:\Windows\INF\oem3.inf. The number in file name might be different.

The remove the driver from the system and perform uninstallation of the driver from devices type following command:

pnputil /remove-driver my-driver.inf /uninstall

Expected result:

Microsoft PnP Utility

Driver package deleted successfully.

3. May 2021 at 7:10 - Development (Tags: , ). Both comments and pings are currently closed.

Comments are closed.