0X800F021F

SPAPI_E_INVALID_REFERENCE_STRING (0x800F021F) Fix

Windows Errors Intermediate 👁 5 views 📅 Jul 2, 2026

Driver install fails with this error when the device's hardware ID contains a malformed reference string. The fix is to manually update the driver with a corrected INF file.

Quick answer for advanced users: The error means the INF file for your device has a malformed device ID — fix it by editing the [Strings] section or the %DeviceDesc% reference in a text editor, then reinstall the driver manually from Device Manager.

This error pops up when Windows tries to install a driver for a USB device, a PCI card, or a custom hardware interface. What's actually happening here is that the driver's INF file contains a reference string — that’s a text label like %DeviceName% — that points to something empty or incorrectly formatted. Windows can't resolve that string, so it throws the 0x800F021F error. I've seen this most often with generic USB-to-serial adapters and older audio interfaces on Windows 10 version 22H2.

Step-by-step fix

  1. Identify the device. Open Device Manager (Win + X > Device Manager). Look for the device with a yellow exclamation mark. Right-click it, select Properties > Details tab > Property dropdown > Hardware Ids. Write down the full string, e.g., USB\VID_1234&PID_5678&REV_0100&MI_00.
  2. Locate the driver INF file. Go to
    C:\Windows\Inf\
    and sort by Date Modified. Find the .inf file that was last modified around the time you tried installing the driver. Usually it’s named oemN.inf where N is a number. Open it with Notepad as administrator.
  3. Find the reference string. Press Ctrl+F and search for the hardware ID you wrote down. A few lines above it, you’ll see something like %DeviceNameHere% = USB_Install, USB\VID_.... The part before the equals sign (e.g., %DeviceNameHere%) is the reference string.
  4. Check the [Strings] section. Scroll down to the [Strings] section at the bottom of the INF file. Look for an entry like DeviceNameHere = "Some Device". If it’s missing, or if the value is blank, that’s your problem. Add it if missing: DeviceNameHere = "Your Device Name". If it has weird characters like ?? or line breaks, clean it up.
  5. Replace the corrupted reference. Sometimes the reference string uses a variable like %ManufacturerName% that itself points to nothing. In that case, I just replace the whole %Variable% = ... line with a hardcoded device name. For example, change
    %MyDevice% = USB_Install, USB\VID_1234
    to
    "My USB Device" = USB_Install, USB\VID_1234
    — skip the variable entirely.
  6. Save and reinstall. Save the INF file. Back in Device Manager, right-click the device and select Update driver > Browse my computer for drivers > Let me pick from a list. Click Have Disk, browse to C:\Windows\Inf\, select the edited .inf file, and install. It should work now.

Alternative fixes if the main one fails

  • Delete the old driver package. Run pnputil /enum-drivers in Command Prompt as admin, find the published name of the broken driver (like oem10.inf), then delete it with pnputil /delete-driver oem10.inf. Then reinstall the driver from scratch.
  • Use the original driver from the manufacturer. Some cheap USB devices ship with INF files that have typos. Download the latest driver from the vendor’s site — they may have fixed the string already.
  • Try a different USB port or PCI slot. Rarely, a hardware controller bug creates a malformed reference string. Moving the device to a different bus can force Windows to re-enumerate and pick up the correct driver.

Prevention tip

To avoid this error in the future, always extract driver files to a separate folder before installing — don’t run setup.exe directly from a zip. Use Device Manager’s "Have Disk" method instead. That way, if the INF is malformed, you see the error before Windows caches the bad driver. Also, keep Windows updated: Microsoft fixed a string parsing bug in KB5029244 that caused this on some USB composite devices.

Was this solution helpful?