How to Install Drivers Using CMD in Windows

Learning how to install drivers using CMD in Windows allows you to add or update hardware drivers through Command Prompt without relying entirely on Device Manager. Drivers help your computer communicate with hardware components such as printers, graphics cards, network adapters, Bluetooth devices, and sound cards. Windows provides built-in command-line tools that make it possible to install driver packages, update existing drivers, and troubleshoot installation problems.
-
Open Command Prompt as Administrator
The first step is to open Command Prompt with administrator privileges because installing drivers requires permission to make changes to Windows.
Follow these instructions:
- Click the Windows Start button.
- Type CMD in the search box.
- Right-click Command Prompt.
- Select Run as administrator.
- Click Yes if Windows asks for permission.
You can now enter commands to manage drivers on your computer.
-
Download the Required Driver
Before installing a driver, download the correct driver package for your hardware and Windows version.
Visit the computer manufacturer’s official website, such as HP, Dell, Lenovo, or ASUS, and locate the appropriate driver.
If the driver is downloaded as a ZIP file, extract it to a folder. You should locate the actual driver files, particularly those with the .inf extension.
For example, you can create a folder called Drivers on your desktop and extract the downloaded files there.
-
Install a Driver Using the PnPUtil Command
Windows includes a command-line utility called PnPUtil that allows you to add and install driver packages.
In Command Prompt, enter:
pnputil /add-driver “C:\Drivers\driver.inf” /install
Replace the file path with the actual location of your driver.
Press Enter and wait for Windows to process the installation.
If the driver package is compatible with your hardware, Windows will add it to the driver store and attempt to install it on the matching device.
-
Install Multiple Drivers at Once
If you have several driver files in one folder, you can install them together using PnPUtil.
Enter the following command:
pnputil /add-driver “C:\Drivers\*.inf” /subdirs /install
This command searches the specified folder and its subfolders for INF driver packages and attempts to install them.
Make sure the folder contains the correct drivers for your computer.
-
Check Installed Drivers Using CMD
After installing drivers, you can check which drivers are available on your Windows computer.
Open Command Prompt as administrator and enter:
driverquery
Press Enter to display a list of installed drivers.
You can also save the results to a text file using:
driverquery /v /fo list > C:\Drivers\installed-drivers.txt
This creates a report containing detailed information about installed drivers.
-
Update Drivers Using CMD
You can use PnPUtil to add a newer driver package to Windows.
Enter:
pnputil /add-driver “C:\Drivers\new-driver.inf” /install
Replace the path with the location of the updated driver.
Windows will determine whether the package can be installed for the relevant device. If a newer or more suitable driver is already installed, Windows may not replace it.
-
Restart Your Computer
Some driver installations require a restart before the hardware can work correctly.
Save your work and enter:
shutdown /r /t 0
Press Enter to restart Windows immediately.
Also Read: How to Install Bluetooth Drivers on Windows 11
