sodcalculator

10 Tech How-To

Fix Class Not Registered Error in Windows 10

Guide 10-7433 · Updated · Step by step

The “Class not registered� error in Windows 10 appears when a program or system feature tries to use a COM (Component Object Model) class that is not properly registered in the registry. You can usually fix it by re-registering the affected DLL files, repairing the app, or running system file checks — the exact steps depend on which program triggers the error.

What Does “Class Not Registered� Mean?

Windows uses the registry to store information about every software component, including COM classes. When an application calls a COM class, Windows looks up its registry entry to find the associated DLL or executable. If that entry is missing, corrupted, or points to a file that no longer exists, you get the “Class not registered� error (error code 0x80040154). This is a system-level error, not a problem with the file you are trying to open — it means the underlying component is not available.

This error commonly appears in:

  • Microsoft Office apps (especially when opening certain file types)
  • Windows Photos app or other built-in UWP apps
  • File Explorer preview pane or thumbnail previews
  • Third-party software that relies on older COM components

Why Does This Error Happen?

The most common causes are:

  • A recent Windows update changed or removed registry entries.
  • A program was uninstalled improperly, leaving broken references.
  • Antivirus software quarantined a DLL that a COM class depends on.
  • The user profile is corrupted (often seen with the Photos app).
  • A 64-bit program tries to use a 32-bit COM component, or vice versa.

Sometimes the error occurs only for one user account, which points to a profile issue rather than a system-wide problem.

How to Fix the “Class Not Registered� Error

Try these fixes in order — they go from least invasive to more thorough.

1. Re-register the DLL Files

Many COM classes are registered by running regsvr32 on the relevant DLL. Open Command Prompt as Administrator and run:

  1. Press Windows + X and select Command Prompt (Admin) or Windows PowerShell (Admin).
  2. Type regsvr32 /u mshtml.dll and press Enter (this unregisters it).
  3. Then type regsvr32 mshtml.dll and press Enter.
  4. Repeat with other common DLLs: actxprxy.dll, jscript.dll, vbscript.dll, shdocvw.dll.

If you see a success message, restart your PC and test the app. If you get an error that the module was not found, you may need to run the 32-bit version of regsvr32 from C:\Windows\SysWOW64\regsvr32.exe for 32-bit DLLs.

2. Repair the Affected Application

If the error comes from a specific program, repair it through Windows Settings:

  1. Go to Settings > Apps > Apps & features.
  2. Find the app (e.g., Microsoft Office, Photos).
  3. Click on it and select Modify or Advanced options.
  4. Choose Repair (and if that doesn’t work, Reset for UWP apps).

For Microsoft Office, you can also use the Quick Repair or Online Repair option from the Control Panel’s Programs and Features.

3. Run System File Checker and DISM

Corrupted system files can cause registration issues. Run these commands in an elevated Command Prompt:

  1. sfc /scannow — this checks and repairs protected system files.
  2. DISM /Online /Cleanup-Image /RestoreHealth — this repairs the system image.

Wait for each to finish (DISM can take 15–30 minutes). Restart after both complete.

4. Re-register the Windows Store Apps

If the error appears in Photos, Mail, or other built-in apps, re-register all Store apps with PowerShell:

  1. Open PowerShell as Administrator.
  2. Run: Get-AppxPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
  3. Wait for it to finish (it may show red errors, but that’s often normal).
  4. Restart your PC.

5. Create a New User Profile

If the error only happens on your account, the profile may be corrupted. Create a new local administrator account and test the app there. If it works, migrate your files and settings to the new profile.

Common Variations and Misconceptions

One common misconception is that the error means the file you’re trying to open is corrupted. In most cases, the file is fine — the problem is that Windows can’t launch the component needed to read it. For example, if you get “Class not registered� when opening a .PDF in a browser, the issue is with the PDF viewer’s COM registration, not the PDF itself.

Another variation is the error appearing in File Explorer when you try to preview a file. This is often fixed by enabling or disabling the preview pane, but the underlying cause is the same — the preview handler is not registered.

Also note: if you’re using a 64-bit version of Windows, some COM classes are only registered for 32-bit or 64-bit processes. A 64-bit app cannot use a 32-bit COM class unless it goes through a surrogate process. This is why re-registering with the correct regsvr32 version matters.

When to Use Advanced Fixes

If the basic fixes don’t work, you may need to:

  • Check the registry manually (using regedit) to see if the CLSID exists — but editing the registry incorrectly can cause more problems, so only do this if you know the specific CLSID.
  • Use System Restore to roll back to a point before the error started.
  • Perform a Windows 10 in-place upgrade repair (using the Media Creation Tool) — this reinstalls Windows without removing your files.

If the error occurs in a specific third-party app, check the app’s support forum for a known fix — sometimes the developer provides a repair tool or an update.

Frequently Asked Questions

Why do I get “Class not registered� when opening Photos?

This is often caused by a corrupted user profile or a broken Windows Store app registration. Try re-registering all Store apps with the PowerShell command above, or reset the Photos app in Settings > Apps > Photos > Advanced options.

Does “Class not registered� mean I have a virus?

No, it’s not a sign of malware. It’s a Windows component registration issue. However, if the error appears randomly in many different apps, it could indicate system file corruption that you should repair with SFC and DISM.

Can I fix this without admin rights?

Most fixes require administrator privileges because they modify system files and the registry. If you’re on a work computer, contact your IT department. If you’re at home, make sure you’re using an administrator account.

Will reinstalling Windows fix it?

Yes, a clean install will definitely fix it, but it’s a last resort. Try the less drastic fixes first — most users resolve it with re-registering DLLs or repairing the app.

Why does the error appear only in Excel, not other Office apps?

Excel may use a specific COM add-in or component that other Office apps don’t. Try repairing Office, or disable add-ins in Excel (File > Options > Add-ins) to see if one is causing the issue.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →