guidox / Hardware

Install a Driver from an INF File When Setup Fails

TL;DR

Read the INF's hardware IDs, then run **pnputil /add-driver file.inf /install**. If the package stages but does not bind, pick it with **Update driver > Browse > Let me pick**.

Before you start

Requirements

  • The extracted driver package
  • Admin rights
  • 15 minutes
Step by step

Instructions

01

Extract the package properly

An installer that unpacks to a temp folder and deletes it afterwards is useless. Setup.exe /extract or 7-Zip gives you the INF and the .sys files next to it.

7z x driver-setup.exe -oC:\Drivers\App
Get-ChildItem C:\Drivers\App -Recurse -Filter *.inf | Select-Object FullName
Get-ChildItem C:\Drivers\App -Recurse -Filter *.sys | Select-Object FullName
02

Read the INF before installing

The **Models** section maps hardware IDs to driver files, and the **Version** section names the architecture and date. A package for the wrong architecture fails without a clear message.

Select-String -Path C:\Drivers\App\*.inf -Pattern '^\[Version\]','Signature','Class','Provider' -Context 0,3
Get-Content C:\Drivers\App\app.inf | Select-String -Pattern 'PCI\\VEN_'
03

Match the package to the device

The device's hardware ID must appear in the INF's Models section, or a compatible ID must. Copy the ID from Device Manager's Details tab and search the INF for it.

Get-PnpDevice -Status Error | Select-Object FriendlyName,InstanceId,Problem
pnputil /enum-devices /problem
Get-PnpDevice -Class Net | Select-Object FriendlyName,InstanceId
04

Stage the driver with pnputil

**/add-driver** copies the package into the driver store; **/install** also tries to bind it to a matching device. The output prints the published oem name you need later.

pnputil /add-driver C:\Drivers\App\app.inf /install
pnputil /enum-drivers | Select-String -Pattern 'oem|Provider|Class' -Context 0,2
Get-WindowsDriver -Online | Where-Object Driver -like '*app*' | Select-Object Driver,ProviderName,Date
05

Bind it by hand when automatic matching fails

A package that stages but does not attach needs a manual pick. **Let me pick from a list** shows the staged versions, including the one you added a moment ago.

devmgmt.msc
# right-click the device > Update driver > Browse my computer
# Let me pick from a list of available drivers > Have Disk > browse to the INF
pnputil /enum-devices /connected | Select-String -Pattern 'app'
06

Verify the device is healthy

A bound driver shows status OK and the expected provider. A code 10 or 43 means the package bound but the hardware rejected it, and the driver log names the reason.

Get-PnpDevice -FriendlyName '*app*' | Select-Object Status,Class,InstanceId
Get-WinEvent -LogName System -MaxEvents 50 | Where-Object ProviderName -eq 'Microsoft-Windows-Kernel-PnP' | Select-Object TimeCreated,Message -First 5
pnputil /enum-devices /problem
Troubleshooting

Common issues

pnputil says the INF does not contain digital signature information

The package is unsigned or signed for another platform. Windows 11 requires a signature; use the vendor's signed release instead of forcing it.

Add-driver succeeds but the device keeps the old driver

The existing driver ranks higher. Remove it with pnputil /delete-driver oemXX.inf /uninstall, then re-add the new package.

The installation fails with error 0x800F0246

The INF has no matching hardware ID for that device. Check the Models section against the ID from Device Manager's Details tab.

Windows installs a generic driver again after a reboot

Windows Update replaced it. Set the device to not receive driver updates, or reinstall and block the specific update.

FAQ

Frequently asked

Is pnputil the same as Device Manager?

It is the command-line interface to the same driver store. Device Manager adds the manual pick and the device tree.

Where does the package end up?

In C:\Windows\System32\DriverStore\FileRepository, referenced by an oemXX.inf name in the config store.

Can I install a driver for a device that is not present?

Yes, staging works without hardware. The package binds when the device appears, which is useful for imaging.

How to undo this

Remove the package with pnputil /delete-driver oemXX.inf /uninstall /force, using the oem name from /enum-drivers, then rescan devices in Device Manager.

Changelog · 1 entry
  1. 2026-11-01
    First version
Interactive version: checklist, feedback, related guides →

Free · no account needed · tracks your progress