Fix 'Invalid Class Name' Hard Drive Error in Windows
This error pops up when Windows can't read drive metadata—here's the registry fix that actually works, and why.
You're staring at 'Invalid Class Name' in Device Manager or Disk Management
Yeah, that's annoying. The drive might show up as unknown or not at all. The fix is usually a quick registry tweak, not a hardware failure.
The Fix: Reset the Drive's Class GUID in Registry
What's actually happening here is Windows lost or corrupted the ClassGUID entry for the drive in the registry. The ClassGUID is a unique identifier that tells Windows what type of device it is—like a disk drive, volume, or storage controller. Without it, Windows can't load the right driver stack.
- Open Device Manager (Win + X, select it).
- Find the problematic drive—look under Disk drives or Storage controllers. It'll often have a yellow exclamation mark or show as Unknown device.
- Right-click it, select Properties, go to the Details tab, and choose Device instance path from the dropdown. Copy that string—it looks like
USB\VID_XXXX&PID_XXXX\XXXXXXXX. - Open Registry Editor (regedit as admin).
- Navigate to:
ReplaceHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\[device instance path][device instance path]with what you copied. - Look for a value named
ClassGUID. If it's missing or blank, you'll need to add it. Right-click in the right pane, select New > String Value, name itClassGUID, and set its value to the correct GUID for your device type:- For a disk drive:
{4d36e967-e325-11ce-bfc1-08002be10318} - For a volume:
{71a27cdd-812a-11d0-bec7-08002be2092f} - For a storage controller:
{4d36e96b-e325-11ce-bfc1-08002be10318}
ClassGUIDis set to something wrong (like{00000000-0000-0000-0000-000000000000}), replace it with the correct one. - For a disk drive:
- Also check the
Classvalue right next to it—it should match. For disk drives, set it toDiskDrive. For volumes,Volume. For storage controllers,SCSIAdapter. - Close Registry Editor and restart your PC.
The reason step 3 works is that the device instance path is the unique key Windows uses to find the device's settings. Once you correct the ClassGUID, Windows can match the device to the correct driver class. After reboot, the drive should reappear normally.
If you don't see the Enum key expanding correctly, you might have a permissions issue—right-click the Enum key, select Permissions, and give Administrators full control. But be careful: Enum is a sensitive area.
Less Common Variations of the Same Issue
Corrupted UpperFilters or LowerFilters
Sometimes the ClassGUID is fine, but the UpperFilters or LowerFilters registry values under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e967-e325-11ce-bfc1-08002be10318} get corrupted. These are filter drivers that sit between the OS and the drive. A bad filter driver from an antivirus or disk tool can cause 'Invalid Class Name'.
Fix: In Registry Editor, go to that Class key, and delete any UpperFilters or LowerFilters values that aren't from Microsoft. Then restart. Common offenders: PartMgr (Microsoft's own partition manager) is safe, but qbichelp or CDR4_* from CD burning software aren't.
Driver Signature Enforcement Blocking the Drive
On Windows 10 and 11, if the drive's driver isn't signed properly (like an old external SSD enclosure with unsigned drivers), the system can refuse to load it and report 'Invalid Class Name'.
Fix: Boot into Advanced Startup (hold Shift while clicking Restart), go to Troubleshoot > Advanced Options > Startup Settings, and select Disable driver signature enforcement. Then try accessing the drive. If it works, you'll need to permanently sign the driver or update the firmware on the enclosure.
USB Device Descriptor Failure
For external drives, the error can stem from a USB device descriptor request failing. This shows as 'Invalid Class Name' in Device Manager under Universal Serial Bus controllers.
Fix: Unplug the drive. Open Device Manager, expand Universal Serial Bus controllers, right-click every USB Root Hub and Generic USB Hub, and select Uninstall device. Then restart. Windows will reinstall USB drivers fresh.
Prevention
- Avoid sketchy disk tools that mess with filter drivers—like ancient versions of Nero or Alcohol 120%. Stick with built-in Disk Management or reputable tools like CrystalDiskInfo.
- Keep Windows updated. Each cumulative update includes storage driver fixes. I've seen Windows 10 22H2 patch KB5034441 resolve a class GUID issue on older SATA drives.
- Eject external drives properly before unplugging—sounds basic, but abrupt disconnects can corrupt the device's registry entry in the Enum tree.
- Back up your registry before making edits. Export the relevant Enum branch first. It's a five-second save that can undo hours of headache.
That's it. The 'Invalid Class Name' error is almost never a dying drive—it's just Windows losing its notes on how to talk to it. Fix the registry, and you're back in business.
Was this solution helpful?