REGDB_E_KEYMISSING (0X80040152) – Missing Registry Key Fix
This COM error means a registry key reference is missing. We'll fix it by restoring the key, re-registering the component, or rebuilding the COM cache.
Quick Answer
Re-register the failing COM component with regsvr32 <dllname> or restore the missing CLSID key from a working machine or backup.
Why This Happens
You're seeing 0x80040152 – REGDB_E_KEYMISSING because some piece of code—usually a COM object, an installer, or a script—tried to look up a registry key that doesn't exist. The error code literally translates to "could not find the key in the registry." What's actually happening is that Windows's COM subsystem stores all its class identifiers (CLSIDs) and interface identifiers (IIDs) under HKEY_CLASSES_ROOT\CLSID. When an application calls CoCreateInstance or similar, COM reads that key to find the DLL or EXE path. If the key is missing—corrupted, deleted by an uninstaller, or never created—you get this error.
The most common real-world trigger: you uninstalled a program (say, an old antivirus or a codec pack) that shared a COM component with another app. The uninstaller nuked the registry key, but the second app still tries to use that component. I've also seen this after a failed Windows Update that garbled the CLSID hive. The error shows up in Event Viewer as a COM error, often in the Application log with source "SideBySide" or "COM+."
Fix Steps
- Identify the missing key. Run
Procmonfrom Sysinternals, filter on the process that shows the error, and look for aRegQueryKeyorRegOpenKeycall that fails withNAME NOT FOUND. That's your missing key. Or check Event Viewer → Windows Logs → Application for an error with CLSID listed. - Re-register the component. If you know the DLL or OCX that should own that CLSID, run
regsvr32 /i <fullpath\component.dll>as Administrator. This rewrites the registry entries. For example, if the missing key belongs tomsxml6.dll, doregsvr32 msxml6.dll. The/iflag forces a fresh install of the registry data. - Manually restore the key from a backup or working machine. On a healthy Windows system (same build number), export the problematic CLSID key from
HKEY_CLASSES_ROOT\CLSID\{your-guid}. Transfer the .reg file to the broken machine, double-click it to merge. This works when the DLL itself is still present but its registration is gone. - Rebuild the COM+ catalog. Open an elevated Command Prompt and run:
Then restart the COM+ System Application service. This fixes mismatched COM+ registration entries.cd /d %windir%\system32\com regsvr32 comadmin.dll regsvr32 comsvcs.dll regsvr32 coloader.dll - Reinstall the offending application. If the above fails, uninstall and reinstall the software that throws the error. Use a clean-uninstall tool like Revo Uninstaller to scrub leftover registry entries first.
Alternative Fixes If the Main Ones Fail
System File Checker
Run sfc /scannow from an elevated Command Prompt. This checks system files—including registered COM DLLs—and replaces corrupted ones. It won't fix a missing CLSID key unless the corrupted file was the DLL itself.
COM+ Catalog Corruption
Sometimes the COM+ database (which stores registration info for component services) gets corrupted. You can rebuild it entirely by deleting %windir%\system32\com\*.mdb files while the COM+ System Application service is stopped. Then restart the service—it recreates the files from scratch. This is drastic but works when nothing else does. Be careful: you'll lose any custom COM+ applications and roles.
Registry Repair Tools
I don't love these, but tools like CCleaner's registry cleaner can spot orphaned CLSID references—though they usually delete them, not fix them. That's the opposite of what you want. Skip these unless you're positive the error came from a stale reference, not a missing key.
Prevention Tips
First, always create a system restore point before uninstalling anything that shares COM components—antivirus, codec packs, Microsoft Office, .NET runtimes. Second, use regedit to export the entire HKEY_CLASSES_ROOT\CLSID key once a month when your system is stable. That export is your safety net. Third, avoid running "registry cleaners"—they cause more REGDB_E_KEYMISSING errors than they fix. The Windows registry is not a junk drawer; it's a structured database. You don't need to vacuum it.
Was this solution helpful?