Fix Class Not Registered Error in Windows 11 Photos
In this article
Yes, the 'Class not registered' error when opening photos on Windows 11 can be fixed by resetting the Photos app, repairing system files, and ensuring proper file associations. This error typically occurs when the app's registration with the system is corrupted, preventing it from launching or displaying images correctly.
What You'll Need
- A Windows 11 PC with administrator access
- Stable internet connection (for updates or reinstalling apps)
- Optional: A backup of important photos (as a precaution)
Step-by-Step
- Restart your PC. A simple reboot can resolve temporary glitches that interfere with app functionality. Save your work and restart the computer before proceeding.
- Check for Windows updates. Press Windows + I to open Settings, go to Windows Update, and click Check for updates. Install any available updates, especially cumulative or system component updates, which may include fixes for built-in apps.
- Reset the Photos app. Open Settings > Apps > Installed apps. Search for 'Photos' or scroll to find Microsoft Photos. Click the three-dot menu next to it, select Advanced options, then scroll down and click Repair. Wait for the process to complete. If the issue persists, return to the same screen and click Reset. Confirm the action. This clears the app’s local data and reinstalls it with default settings.
- Re-register the Photos app using PowerShell. Press Windows + X and select Windows Terminal (Admin) or PowerShell (Admin). In the window, paste the following command and press Enter:
Get-AppxPackage -allusers Microsoft.Windows.Photos | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}Wait for the process to finish. You may see brief messages, but no errors should appear. Close the terminal. - Set Photos as the default app for image files. Go to Settings > Apps > Default apps. Scroll down and click on .jpg under 'Choose default apps by file type'. Select Microsoft Photos from the list. Repeat for .png, .bmp, and .gif if needed. This ensures image files are properly associated with the app.
- Run the System File Checker (SFC) tool. Open Command Prompt as Administrator (via Windows + X menu). Type
sfc /scannowand press Enter. The scan may take 15–20 minutes. If corrupted system files are found and repaired, restart your PC and test the Photos app. - Use the DISM tool if SFC fails. In the same Command Prompt window, run:
DISM /Online /Cleanup-Image /RestoreHealth
This command repairs the Windows image and may resolve deeper system issues. Wait for completion, then restart and recheck the Photos app.
Common Mistakes
- Skipping the Repair step before Resetting the app. Repair attempts to fix issues without clearing data, so always try it first.
- Running the PowerShell command without administrator rights. The re-registration command requires elevated privileges and will fail otherwise.
- Assuming all image files should open in Photos. Some formats (like RAW or HEIF) may require additional codecs or third-party apps, even if Photos is set as default.
- Ignoring Windows updates. Outdated system builds can cause app compatibility issues, including registration errors.
Tips
- Create a system restore point before making significant changes. This allows you to revert if something goes wrong during troubleshooting.
- Use the built-in Feedback Hub to report the issue if it persists. Microsoft may provide targeted fixes for widespread bugs.
- Try opening photos in alternate apps like Paint or a web browser to confirm the files are not corrupted.
- Check if the error occurs only with specific folders. Some network or encrypted drives may restrict app access.
Troubleshooting
If the error persists after all steps:
- Boot into Safe Mode and repeat the app reset and PowerShell steps. Safe Mode loads minimal drivers and services, which can help isolate conflicts.
- Check for third-party software conflicts. Antivirus, optimization tools, or shell extensions may interfere with app registration. Temporarily disable non-essential startup apps via Task Manager.
- Create a new user profile. Go to Settings > Accounts > Family & other users > Add account. Log in to the new account and test the Photos app. If it works, the issue is profile-specific, and migrating data may be necessary.
- Consider a Windows 11 repair install (in-place upgrade). Download the Windows 11 ISO from the official site, mount it, and run setup.exe while keeping files and apps. This reinstalls the OS without data loss.
Frequently Asked Questions
Why does the 'Class not registered' error happen?
This error occurs when Windows cannot find or load the required components for the Photos app, often due to corrupted registration, missing files, or update failures.
Will resetting the Photos app delete my pictures?
No. Resetting only clears app settings and cache. Your photos stored in folders like Pictures or OneDrive are not affected.
Can I use a different photo viewer instead?
Yes. You can install third-party apps like IrfanView, XnView, or Adobe Photoshop Express and set them as default for image files.
Does this error affect other apps?
Sometimes. If multiple built-in apps fail, it may indicate broader system corruption. Run SFC and DISM scans to address underlying issues.
Do I need to reinstall Windows to fix this?
Not usually. Most cases are resolved with app reset, PowerShell re-registration, or system file repairs. A full reinstall is a last resort.
Why doesn’t the PowerShell command work?
Ensure you’re running it in an admin terminal, the Photos app is installed, and there are no typos. If the command returns 'no matching packages,' the app may be uninstalled and needs reinstalling via the Microsoft Store.