0X00000006

Fix ERROR_INVALID_HANDLE (0x00000006) on Windows Fast

This error means Windows lost track of a file, USB, or printer handle. I'll walk you through fixes from a quick reboot to registry edits.

What Is ERROR_INVALID_HANDLE (0x00000006)?

I've seen this error pop up on Windows machines for years—usually when something goes wrong with a USB drive, a printer, or a corrupt file that Windows tries to access. The error code 0x00000006 literally means the handle (a pointer Windows uses to track an open resource) is invalid. Think of it like a phone number that's been disconnected: Windows has the old digits but can't connect.

Most of the time, this happens after a USB device is yanked out without safely ejecting, or after a printer driver crashes mid-job. Had a client last month whose entire print queue died because of this—every print job threw the error until we cleaned out the spooler. But it can also show up when you're copying files, running an app, or even booting up.

Let me show you the fixes, from the 30-second no-brainer to the deeper stuff that takes 15 minutes. Start at the top and stop when it works.

Quick Fix (30 seconds): Restart and Reconnect

Don't roll your eyes—half the time, this is it. Windows loses track of handles when a device is unplugged unexpectedly or when a service stalls. A restart clears all handles and resets the state.

  1. Restart your computer. Not shut down and turn back on—use the Restart option. Windows 10 and 11 sometimes do a hybrid shutdown that doesn't clear everything.
  2. If it's a USB device: Unplug it, wait 10 seconds, plug it back in. Try a different USB port.
  3. If it's a printer: Turn the printer off, wait 30 seconds, turn it back on. Reconnect the USB cable.
  4. If it's a file: Close the app that's accessing it, reopen it.

Had a small business owner whose external hard drive kept throwing this error after his kid yanked it out. A restart fixed it—took 45 seconds. If it didn't, move on.

Moderate Fix (5 minutes): Repair System Files and Services

If the quick fix didn't cut it, the problem is likely a corrupt system file or a stuck service. Let's check both.

Run System File Checker (SFC)

SFC scans for corrupt Windows files and replaces them. This catches a lot of handle errors caused by bad drivers or system updates.

sfc /scannow

Open Command Prompt as Administrator (search "cmd", right-click, Run as administrator). Type that command and press Enter. Let it run—takes about 5–10 minutes. If it finds issues, it'll fix them. Reboot after.

If SFC can't fix everything, run DISM first to repair the component store:

DISM /Online /Cleanup-Image /RestoreHealth

Then run SFC again. I've seen this combo fix a client's printer that had been throwing the error for weeks.

Restart the Print Spooler (If Printer-Related)

For printer errors, the print spooler is often the culprit. It caches handles to printer drivers, and when it gets stale, you get the error.

  1. Open Services (type services.msc in Run).
  2. Find Print Spooler.
  3. Right-click, select Stop.
  4. Navigate to C:\Windows\System32\spool\PRINTERS and delete everything in that folder.
  5. Go back to Services, right-click Print Spooler, select Start.

Clear that queue and you're golden. I do this for every print issue before anything else.

Advanced Fix (15+ minutes): Registry Cleanup and Driver Reinstall

When the above fails, the handle is corrupted at a deeper level—often in the registry or a stale driver entry. This is rare but happens after a bad update or a driver that didn't uninstall cleanly.

Step 1: Check for Corrupt Registry Keys

The error can point to an invalid handle in the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class for device-related handles, or HKEY_CURRENT_USER\Software for app handles. But don't go poking blindly—use Event Viewer first.

  1. Open Event Viewer (type eventvwr.msc in Run).
  2. Go to Windows Logs > System.
  3. Filter by the error source (e.g., "USB" or "Print"). Look for Event ID 6 (this maps to 0x00000006).
  4. The details will show which device or driver is causing the issue. Note the Class GUID or Device Instance ID.

Once you have the GUID, open Regedit and navigate to:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{your-GUID}

Right-click the key, select Export to back it up, then delete the key. Reboot and let Windows reinstall the driver automatically. I've done this for a client's USB controller that was stuck with an invalid handle after a failed driver update—fixed it in 10 minutes.

Step 2: Reinstall the Driver Cleanly

For USB devices or printers, a corrupt driver can keep a bad handle alive. Here's the thorough way:

  1. Open Device Manager (right-click Start > Device Manager).
  2. Find the device (look for a yellow exclamation mark).
  3. Right-click, select Uninstall device. Check Delete the driver software for this device if it's an option.
  4. Reboot—Windows will reinstall the default driver.
  5. If that fails, download the latest driver from the manufacturer's site and install manually.

Don't use Windows Update for this—it often pushes the same bad driver again. Go directly to the manufacturer.

Step 3: Check for Malware

Something like a rootkit or a corrupt antivirus hook can also create invalid handles. Run a full scan with Windows Defender or Malwarebytes. Had a client whose error was caused by a rogue driver from a fake USB driver updater—malware scan caught it.

When to Give Up and Reinstall Windows

Honestly? If none of this works, and it's a system-level handle error that shows up on every boot, your Windows installation might be trashed. Back up your data, download a clean ISO from Microsoft, and do a fresh install. I've only had to do that twice in 10 years for this specific error—it's that rare.

But 9 times out of 10, the restart or SFC fix handles it. Start there and save yourself the headache.

Related Errors in Windows Errors
0X8010002E SCARD_E_NO_READERS_AVAILABLE (0X8010002E) fix 0XC00D273F Fix NS_E_DRM_UNABLE_TO_SET_PARAMETER (0XC00D273F) in Windows Media Player 0X00002090 Fix ERROR_DS_ALIAS_POINTS_TO_ALIAS (0X00002090) in Active Directory 0X0000085F Fix 0X0000085F: "The event name is invalid" on Windows

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.