SPAPI_E_DRIVER_STORE_ADD_FAILED (0X800F0247): Real Fix
Driver won't install because Windows can't copy it to the driver store. Usually a permissions or corrupted driver cache issue.
Quick Answer
Run pnputil /delete-driverstore to clear corrupted driver cache, then retry the install. If that doesn't work, take ownership of C:\Windows\System32\DriverStore and delete the FileRepository folder manually.
Why This Happens
The error 0x800F0247 — SPAPI_E_DRIVER_STORE_ADD_FAILED — means Windows couldn't copy your driver's files into the DriverStore\FileRepository folder. What's actually happening here is the driver cache has become corrupt or filled with orphaned entries from failed updates. The installer tries to stage the driver, hits a file that's locked, incomplete, or permission-blocked, and bails out with this code.
I've seen this most often on Windows 10 21H2 through 22H2, and on Windows 11 after a feature update when old display or network drivers leave behind junk. You'll get it when installing a signed driver for a new GPU, a Wi-Fi adapter, or even a printer. The fix isn't reinstalling Windows — it's cleaning the store.
Step-by-Step Fix
- Open Command Prompt as Administrator. Press Win+X, choose Terminal (Admin) or Command Prompt (Admin).
- List all third-party drivers in the store:
Look for any drivers with a yellow bang or that you know are old. Note their Published Name (e.g.,pnputil /enum-driversoem0.inf). - Delete unused or old drivers one at a time:
Do this for each driver you want to remove. This forces Windows to rebuild those entries.pnputil /delete-driver oem0.inf - Clear the entire FileRepository (nuclear option — use only if step 3 fails):
Then recreate the folder:takeown /f C:\Windows\System32\DriverStore\FileRepository /r /d y icacls C:\Windows\System32\DriverStore\FileRepository /grant Administrators:F /t rmdir /s /q C:\Windows\System32\DriverStore\FileRepositorymkdir C:\Windows\System32\DriverStore\FileRepository - Retry your driver install. The installer will now create fresh entries.
Alternative Fixes If That Doesn't Work
Check Disk for Corruption
Sometimes the store gets corrupted because the underlying disk has bad sectors. Run:
chkdsk C: /f /rReboot afterward — it'll scan on next boot. If it finds errors, Windows will try to recover the store files.
Reset the Driver Store via DISM
DISM can repair the driver store component itself. Run:
DISM /Online /Cleanup-Image /RestoreHealthThis checks the system image for corruption. It's slow but safe. After it finishes, reboot and try the install again.
Run SFC
If DISM doesn't fix it, System File Checker might catch a damaged system file that pnputil relies on:
sfc /scannowYou'll get a log at C:\Windows\Logs\CBS\CBS.log if you're curious what it found.
Prevention Tip
Don't let Windows automatically install every driver update. Use Show or hide updates troubleshooter (Microsoft's own tool) to block driver updates for devices you know work. Also, before installing a new driver, always uninstall the old one from Device Manager with the Delete the driver software for this device checkbox checked. That removes its entry from FileRepository, so the store stays clean.
Nearly every SPAPI_E_DRIVER_STORE_ADD_FAILED I've debugged traced back to a half-installed driver from a Windows Update that never finished. The real fix is to purge those ghost entries, not to hunt for registry keys.
Was this solution helpful?