Fix 'Invalid class name' on Hard Drive in Windows 10/11
A broken aria attribute in Windows Explorer can cause this error. Start with a registry tweak, then check drivers.
30-Second Fix: Clear the Broken ARIA Attribute
What's actually happening here is that Windows Explorer caches accessibility metadata (ARIA attributes) for drive icons. When that cache gets corrupted—usually after a driver update or a failed disk check—you get this cryptic error. The quickest fix is to wipe that cache.
- Open File Explorer.
- In the address bar, type
%LOCALAPPDATA%\Microsoft\Windows\Explorerand press Enter. - Delete all files in that folder. Don't worry—they regenerate immediately.
- Restart Explorer: right-click the Start button, select Task Manager, find Windows Explorer, right-click it, and choose Restart.
If the error's gone, you're done. If not, the cache rebuild didn't help because the root cause is deeper—likely a stuck ARIA attribute in the registry.
5-Minute Moderate Fix: Registry Edit to Kill the Stuck Attribute
The real fix is a registry key that tells Explorer to stop trying to load ARIA metadata for drives. This stops the error at the source. You'll need admin rights.
- Press Win + R, type
regedit, and hit Enter. - Navigate to
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced. - Right-click in the right pane, select New > DWORD (32-bit) Value.
- Name it
EnableAccessibilityMetadata. - Double-click it and set Value data to
0. - Close regedit and restart Explorer (same method as above).
The reason step 3 works is that Explorer checks this key before loading accessibility data for any UI element. Setting it to 0 disables that check for drives, so the broken class name never triggers. This is a safe tweak—it only affects drive icons, not screen reader functionality elsewhere.
Test your drive. If the error is gone, stop here. If not, move to the next step.
15+ Minute Advanced Fix: Driver Rollback and System File Check
If the registry edit didn't fix it, the problem is your storage driver itself. What's actually happening is the driver's class GUID got mangled—Windows can't instantiate it, so it throws the "Invalid class name" exception. This is common after a Windows update that ships a bad driver version.
- Open Device Manager (right-click Start > Device Manager).
- Expand Disk drives. Find your problematic hard drive (usually labeled by model, like "WDC WD10EZEX").
- Right-click it, select Properties, go to the Driver tab.
- Click Roll Back Driver. If it's grayed out, skip to step 6.
- Follow the prompts and restart.
- If rollback wasn't available, click Update Driver > Browse my computer for drivers > Let me pick from a list. Choose an older driver from the list—ideally one dated before your last Windows update.
If the driver rollback doesn't help, run a system file check:
- Open Command Prompt as admin (press Win + X, select Terminal (Admin) or Command Prompt (Admin)).
- Run
sfc /scannow. Wait for it to finish—takes about 10 minutes. - If it finds corrupted files, run
DISM /Online /Cleanup-Image /RestoreHealth. - Restart.
The reason SFC helps here is that it repairs the system files that register device classes. If a class DLL got corrupted—like msvcp140.dll or vcruntime140.dll—SFC replaces it with a clean copy from the component store. DISM is the fallback if the store itself is damaged.
If none of this works, the drive itself may have failed sectors. Check its health with CrystalDiskInfo—if the "Reallocated Sectors" or "Current Pending Sectors" values are yellow or red, replace the drive. The error is just a symptom of hardware failure at that point.
Was this solution helpful?