0X80030006

0x80030006 (STG_E_INVALIDHANDLE) When Accessing External Drive

Hardware – Hard Drives Intermediate 👁 0 views 📅 May 27, 2026

This error means Windows can't talk to your drive properly. It's usually a corrupted handle after a failed eject or a driver hiccup. Quick fix: restart Explorer or replug the drive.

Quick answer: Restart Windows Explorer via Task Manager, or unplug and replug the external drive at the physical port. If it still persists, run chkdsk X: /f (replace X with your drive letter).

I've seen this one a lot — especially on Windows 10 and 11 after someone force-ejects a USB drive or yanks it out mid-transfer. The 0x80030006 error (STG_E_INVALIDHANDLE) basically tells you that the file handle Windows was holding onto became stale or corrupted. The drive itself is probably fine; it's the connection state that's broken. You'll see this in File Explorer when trying to open the drive, or in apps like Disk Management or Robocopy. The usual trigger: you had the drive open, it went to sleep, you woke the PC, and now it throws this error on any operation.

Fix 1: Restart Windows Explorer

This clears stuck handles. Don't skip it just because it sounds basic — it works more often than you'd think.

  1. Press Ctrl+Shift+Esc to open Task Manager.
  2. Find Windows Explorer under the Processes tab.
  3. Right-click it and select Restart. Your taskbar and desktop will flicker briefly.
  4. Now try accessing the drive again.

If that didn't work, move on.

Fix 2: Unplug and Replug — at the Physical Port

This sounds dumb, but I mean unplug the cable from the PC and the drive, wait 10 seconds, then plug it back in. Also try a different USB port — preferably a USB 3.0 port on the back of the PC, not a front panel one. Front ports have voltage drop issues that can cause phantom disconnects.

Fix 3: Run chkdsk on the Drive

If the handle issue is due to file system corruption (which often follows a bad eject), chkdsk can fix it. Open Command Prompt as Administrator (Win+R, type cmd, right-click and Run as Administrator).

chkdsk X: /f /r

Replace X with your drive letter. /f fixes errors, /r finds bad sectors. This will take a while on large drives — maybe 20–30 minutes on a 1TB external. Don't interrupt it.

Fix 4: Reinstall the USB Controller Driver

This resolves driver mismatches that cause stale handles. Open Device Manager (Win+R, type devmgmt.msc). Expand Universal Serial Bus controllers. Right-click each item that says USB Root Hub or Generic USB Hub and select Uninstall device. Don't worry — they'll reinstall automatically on reboot. After uninstalling all of them, restart your PC.

Alternative: Use Diskpart to Clean and Reassign (Advanced)

If the drive still throws the error, the handle might be stuck at the volume level. This is a nuclear option — it wipes the drive's volume structure but not the data if you're careful.

  1. Open Command Prompt as Administrator.
  2. Type diskpart and press Enter.
  3. Type list volume. Find your external drive's volume (check the size).
  4. Type select volume X (replace X with the volume number).
  5. Type attributes volume clear readonly to force off any read-only flags.
  6. Type remove to detach the volume from the system.
  7. Then type assign letter=Z (or any free letter).

This forces Windows to re-register the volume handle. If you get a "The virtual disk service encountered an error" message, the drive might have physical issues — check with CrystalDiskInfo.

Prevention Tip: Always Safely Remove Hardware

I know you've heard it a thousand times, but the "Safely Remove Hardware" icon in the system tray isn't there for decoration. When you disable a drive properly, Windows flushes the file system cache and closes all handles cleanly. Yanking the cable — especially during writes — is the #1 cause of STG_E_INVALIDHANDLE. Set a habit: right-click the USB icon, select your drive, wait for the "Safe to Remove Hardware" pop-up. On Windows 11, you can also enable Quick Removal in Device Manager (right-click the drive > Properties > Policies > Quick removal) — this disables write caching, reducing handle corruption risk at the cost of slightly slower writes.

If none of the above work, test the drive on another PC. If it errors there too, the cable or the drive's controller board is failing. Replace the cable first — it's the cheapest fix. If that doesn't help, your drive might be on its last legs. Back up what you can immediately.

Was this solution helpful?