The “Class not registered” error in the Photos app on Windows usually appears when the app tries to open, edit, or import a photo, and it fails because a required Windows component or the app’s own registration is broken. The fix typically involves resetting the Photos app, re-registering it via PowerShell, or repairing the Windows system files. Below are the exact steps to resolve it, along with the background on why this error occurs.
What Causes “Class Not Registered” in the Photos App?
This error is a Windows COM (Component Object Model) error (error code 0x80040154). It means Windows tried to launch a registered component—usually the Photos app itself or a related shell extension—but couldn’t find the class registration in the registry. Common triggers include:
- Corrupted Windows Store app cache or a partially updated Photos app.
- A third-party image editor or codec pack that overwrote a Windows handler.
- Outdated Windows 10 or 11 installation with missing servicing updates.
- User profile corruption where the app’s registration is tied to a specific account.
- A recent system restore or registry cleaner that removed necessary entries.
The error is not unique to Photos—it can occur in other UWP (Universal Windows Platform) apps, but Photos is the most commonly affected because it relies heavily on COM handlers for file previews and editing.
Fix 1: Reset the Photos App from Settings
The quickest fix is to reset the app, which clears its cache and resets its internal state without affecting your photo files.
- Open Settings (Win + I) and go to Apps > Installed apps (Windows 11) or Apps & features (Windows 10).
- Scroll to Microsoft Photos and click the three-dot menu (or the app name).
- Select Advanced options.
- Click Reset (Windows 11) or Repair first, then Reset if the repair doesn’t help (Windows 10).
- Restart your PC and try opening Photos again.
If the Reset button is greyed out, the app may be corrupted at a deeper level—move to the PowerShell fix below.
Fix 2: Re-register the Photos App with PowerShell
Re-registering the app forces Windows to recreate its registry entries. This is the most reliable fix for a persistent “Class not registered” error.
- Right-click the Start button and select Windows Terminal (Admin) or PowerShell (Admin).
- Copy and paste this command, then press Enter:
Get-AppxPackage -Name Microsoft.Windows.Photos | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
- Wait for the command to finish (it may take a minute).
- Close the window and restart your PC.
If you get an error saying the package is not found, the Photos app may have been uninstalled entirely. In that case, go to Settings > Apps > Optional features and add Microsoft Photos, or reinstall it from the Microsoft Store.
Fix 3: Repair Windows System Files
If the error persists, underlying system file corruption could be the cause. Run the built-in System File Checker and DISM tools.
- Open Command Prompt as Administrator (search for “cmd”, right-click, and choose Run as administrator).
- Run
sfc /scannowand wait for it to complete (it can take 15–30 minutes). - Then run
DISM /Online /Cleanup-Image /RestoreHealthand wait for that to finish. - Restart your PC and test Photos.
These commands check for corrupted system files and repair them using Windows Update. If SFC finds issues it cannot fix, DISM usually resolves them.
Fix 4: Check Default App Associations and Third-Party Codecs
Sometimes the error appears only when opening specific file types (like HEIC or RAW) because a third-party codec or a different default app is interfering.
- Go to Settings > Apps > Default apps and ensure Photos is set as the default for image files (JPG, PNG, etc.).
- If you recently installed a codec pack (like K-Lite or HEVC extensions), uninstall it temporarily and test Photos.
- For HEIC/HEIF files, install the official HEVC Video Extensions from the Microsoft Store (some are paid, but the device manufacturer version is often free).
If the error only happens with a specific file, try renaming the file extension (e.g., .jpg to .png) to see if it’s a format-specific handler issue.
Fix 5: Create a New Windows User Profile
If none of the above works, the problem may be tied to your user account. A corrupt profile can prevent COM registrations from loading correctly.
- Create a new local user account: Settings > Accounts > Family & other users > Add account.
- Log into the new account and test Photos.
- If it works, migrate your files and settings to the new account (or use the old one for storage only).
This is a last resort because it requires re-setting up your preferences, but it often resolves deep profile corruption that other fixes miss.
When to Use the Windows Store Reinstall
If re-registering via PowerShell didn’t work, the app installation itself may be damaged beyond repair. In that case, uninstall and reinstall the app completely.
- Open PowerShell as Administrator.
- Run
Get-AppxPackage -Name Microsoft.Windows.Photos | Remove-AppxPackage. - Restart your PC.
- Open the Microsoft Store, search for “Microsoft Photos”, and click Install.
This removes the app entirely and installs a fresh copy. Your photos are not deleted—they remain in your Pictures folder.
Frequently Asked Questions
Will resetting the Photos app delete my photos?
No. Resetting or reinstalling the Photos app only affects the app’s settings and cache. Your actual photo files in the Pictures folder or external drives are untouched.
Why does the error only happen when I right-click a photo?
Right-clicking opens the context menu, which uses a different set of COM handlers. A third-party app (like a cloud sync client or image editor) may have registered a broken handler. Try disabling shell extensions from tools like ShellExView, or uninstall recently added image software.
Can I just use a different photo viewer instead?
Yes, you can use the classic Windows Photo Viewer (if enabled) or a third-party app like IrfanView or GIMP. But fixing the Photos app is better because it integrates with Windows features like OCR and video editing.
Does this error occur on Windows 11 as well?
Yes, the same error appears on both Windows 10 and 11. The fixes are identical, though the Settings menu layout differs slightly.
Is there a way to prevent this error from happening again?
Keep Windows Update on, avoid using registry cleaners, and be cautious when installing codec packs. If you use HEIC files, always install the official HEVC extension from the Store.
What if the PowerShell command says “The package was not found”?
That means the Photos app is not installed for your user account. Install it from the Microsoft Store first, then run the re-register command again.
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
- Backspace Not Working in Windows 10? Fix It
- Fix Windows Server Error 0x80070422
- Limit AI Features & Data Sharing in Apps
- How to Choose a Partition Scheme for Linux
- Error 0x80070005: Fix Access Denied in Windows
- Telegram Web Notifications Not Working: 7 Fixes