Hard Drive Error: Invalid Class Name Fix
Quick fix for the 'Invalid Class Name' error on hard drives. Usually a driver or registry glitch in Windows 10/11.
Quick Answer
Open Device Manager, find your hard drive under 'Disk drives', right-click it, choose 'Uninstall device', then restart your PC. Windows reinstalls the driver automatically.
Why This Happens
The 'Invalid Class Name' error usually shows up in Device Manager or Event Viewer when a storage driver's registry entry gets corrupted. This can happen after a partial Windows update, a failed driver installation, or even a bad SATA cable connection. I've seen it most often on systems running Windows 10 version 22H2 and Windows 11 after the KB5023706 update. The error doesn't mean your drive is dead—it's just a software misconfiguration that keeps the driver from loading properly.
The real fix is simple: force Windows to rebuild that driver entry. The steps below walk you through it.
Fix Steps
- Open Device Manager. Press Win + X and select 'Device Manager'. If you don't see it, press Win + R, type
devmgmt.msc, then hit Enter. - Find your drive. Expand 'Disk drives'. You'll see your hard drive listed—maybe with a yellow exclamation mark, maybe not. Look for the drive that's showing the error. Right-click it and select 'Properties'. Go to the 'Details' tab, then under 'Property' dropdown, pick 'Class Guid'. The value should be
{4d36e967-e325-11ce-bfc1-08002be10318}. If it's blank or shows something else, that's the problem. - Uninstall the device. Go back to the 'General' tab, then click 'Uninstall device'. A warning pops up—it says 'Are you sure you want to uninstall this device?' Check the box that says 'Delete the driver software for this device' if you see it. Then click 'Uninstall'.
- Restart your PC. Don't just use 'Scan for hardware changes'—a full restart is required. After Windows boots, it will reinstall the driver automatically. Check Device Manager again; the drive should show up without any error. If it doesn't, move to the alternative fixes.
If the Main Fix Doesn't Work
Fix 1: Manually Update the Driver
Sometimes Windows picks a wrong driver. Open Device Manager, right-click the drive, select 'Update driver', then 'Browse my computer for drivers'. Click 'Let me pick from a list of available drivers on my computer'. Select 'Standard NVM Express Controller' (for NVMe SSDs) or 'ATA Channel 0' (for SATA drives). Click 'Next' and follow the prompts. After it installs, restart.
Fix 2: Edit the Registry
If the driver installs but still shows 'Invalid Class Name', the Class GUID might be corrupted in the registry. This is risky—back up your registry first. Open Registry Editor (Win + R, type regedit). Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e967-e325-11ce-bfc1-08002be10318}. In the right pane, check the 'Class' string value—it should be 'DiskDrive'. If it's missing or wrong, right-click an empty space, select 'New' > 'String Value', name it 'Class', set its value to DiskDrive. Also check the 'ClassGUID' string value—it must be {4d36e967-e325-11ce-bfc1-08002be10318}. If it's wrong, correct it. Restart.
Fix 3: Reinstall Storage Controllers
If the drive still fails, the problem might be in the storage controller. In Device Manager, expand 'Storage controllers'. Right-click your controller (usually 'Intel SATA AHCI Controller' or 'Standard NVM Express Controller') and select 'Uninstall device'. Restart the PC. Windows reinstalls the controller driver. Then apply the main fix again.
Prevention Tip
To avoid this in the future, never let Windows Update install driver updates automatically. Set driver updates to manual in Windows Update settings. I also recommend checking your drive manufacturer's support page for firmware updates—outdated firmware can cause this error after Windows updates. For example, Samsung 990 Pro SSDs needed a firmware update in 2023 to fix a similar issue. Check your drive model and apply firmware updates once a year.
Was this solution helpful?