Invalid class name

Invalid class name hard drive error – fix in 3 steps

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

This error means Windows can't find a driver class for your drive. Start with the 30-second fix, then work your way up.

What the 'Invalid class name' error actually means

You plug in a hard drive — internal or external — and Windows throws up 'Invalid class name' in Device Manager, usually with a yellow exclamation mark. The drive doesn't appear in File Explorer. The error code (if you click Properties) is often Code 10 or Code 39.

What's actually happening here is that Windows can't resolve the device's ClassGUID in the registry. Every hardware device has a GUID that tells Windows which driver class it belongs to — like 'DiskDrive', 'StorageVolume', or 'SCSIAdapter'. When that GUID is missing, corrupted, or points to a nonexistent class, you get 'Invalid class name'. This happens most often after a Windows update that screws up the registry, or after using disk cloning tools that don't clean up properly.

Fix 1: The 30-second check — scan for hardware changes

This sounds too simple, but the first thing you do is force Windows to re-enumerate the device. It rebuilds the driver stack, which sometimes fixes a transient class mismatch.

  1. Open Device Manager (right-click Start → Device Manager).
  2. Find the drive with the yellow exclamation. It's usually under 'Disk drives' or 'Other devices'.
  3. Click the top-level node (your PC name) so it's highlighted.
  4. Go to the Action menu and click 'Scan for hardware changes'.

If the error disappears and the drive shows up, you're done. If not, the registry is the problem — move to Fix 2.

Pro tip: You can also unplug the drive, wait 10 seconds, plug it back in. Same effect, but you're forcing a power cycle too.

Fix 2: The 5-minute fix — correct the registry ClassGUID

This is the real fix for 90% of these errors. The device's ClassGUID in the registry is either missing or pointing to a wrong class. You need to find the device and set it to the correct GUID for hard drives.

Step 1: Identify the device's hardware ID

Right-click the broken device in Device Manager → Properties → Details tab → Property dropdown → 'Hardware Ids'. You'll see a string like IDE\DiskST1000DM003... or USB\VID_... — copy the first one.

Step 2: Find the device in the registry

Open Regedit (Win+R → regedit). Navigate to:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\

Search for the hardware ID you copied (Edit → Find). You'll find a key under Enum\ that matches. Inside, there's a Device Parameters subkey, but the important one is the main device key (the one with a ClassGUID value).

Step 3: Check and fix the ClassGUID

Look at the ClassGUID string in the right pane. For a hard drive, it should be:

{4d36e967-e325-11ce-bfc1-08002be10318}

That's the GUID for 'DiskDrive' class. If it's something else — or missing — right-click the entry and modify it to that value. If the ClassGUID value doesn't exist, create a new String value named ClassGUID and set it to the GUID above.

Then check the Class value (also a string) — set it to DiskDrive if it isn't already.

Step 4: Reboot

Close Regedit, restart your PC. The drive should now appear. If the error returns on next boot, you've got a deeper driver issue — go to Fix 3.

Why this works: Windows uses the ClassGUID to load the correct driver stack (disk.sys, partmgr.sys, etc.). When it points to 'UnknownClass' or a wrong GUID, the driver fails to load. Setting it to the DiskDrive GUID tells Windows exactly what to do.

Fix 3: The 15+ minute fix — clean driver reinstall and registry scrub

If fixes 1 and 2 didn't work, the problem is a corrupted driver store or leftover junk from a previous driver. You need to nuke everything and start fresh.

Step 1: Remove the device and its drivers completely

In Device Manager, right-click the broken device → Uninstall device. Check 'Delete the driver software for this device' if you see it. This removes the driver package from the driver store.

Then go to View → Show hidden devices. Under 'Disk drives' and 'Storage controllers', you might see grayed-out ghosts of the same device. Right-click and uninstall those too.

Step 2: Delete the registry entry for the device

In Regedit, go back to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\ and delete the entire key for your device (the one you found in Fix 2). This wipes any corrupted ClassGUID or Class entries that Windows cached.

Be careful: only delete the key for this specific device, not the whole Enum tree.

Step 3: Clear the driver cache (optional but recommended)

Open an admin Command Prompt and run:

pnputil /enum-drivers

Look for a driver published name that matches your device, e.g., oem42.inf. Delete it with:

pnputil /delete-driver oem42.inf

Only do this if you know for sure it's the right driver. If unsure, skip this step — it's not always needed.

Step 4: Reinstall the driver

Reboot. Windows will detect the drive and ask for a driver — let it search automatically. If the drive is standard SATA or USB, the built-in Microsoft driver will work. For specific brands (WD, Seagate, Samsung), download the official driver package from the manufacturer and run it.

If the drive still shows 'Invalid class name' after all this, the issue might be hardware — bad SATA cable, failed controller. Try the drive on another PC to confirm.

When to give up and replace the drive

If you've gone through all three fixes and the error still shows, and the drive doesn't appear in Disk Management (diskmgmt.msc) either, the drive's firmware or physical hardware is likely toast. Back up any data you can, then replace it.

That's it. Three levels, one real cause, and no fluff.

Was this solution helpful?