Quick answer: Re-register the COM component using regsvr32 or repair the application via Control Panel. If that fails, check the registry for orphaned CLSID entries and delete them.
I know this error is infuriating. You're trying to open a file or run a program, and instead you get a popup that just says "Application not found" with that ugly 0X800401F5 code. I've seen it most often when someone uninstalled an old Office version but left shortcuts behind, or when a COM+ component from a third-party tool gets corrupted. The error means the COM system has a reference to an app that no longer exists at the path it expects. It's a ghost in the machine.
Here's the fix. Start with the most common cause—a missing or unregistered DLL—and work down.
Step 1: Re-register the COM Component
Open an elevated Command Prompt (right-click Start, select Command Prompt (Admin) or Terminal (Admin)). Type:
regsvr32 /u <dllname>.dll
regsvr32 <dllname>.dllReplace <dllname> with the DLL that the error points to, if you know it. If you don't, try re-registering common ones like ole32.dll or comctl32.dll. This works because COM uses the registry to find the server—if the registration is stale, re-registering writes fresh paths.
Step 2: Repair the Application
If you know which app is failing—say, an old Office version or a custom business tool—repair it. Go to Settings > Apps > Apps & features, find the app, click Modify or Advanced options, then select Repair. This will reinstall missing COM entries and fix broken shortcuts.
Step 3: Clean Up Orphaned Registry Entries
This one's trickier but often the real fix when the app is gone for good. Open Regedit and navigate to:
HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000000}Replace the GUID with the one in the error message, if available. If not, search for the app name under HKEY_CLASSES_ROOT\AppID. Find any key pointing to a nonexistent file path. Right-click it and export it as a backup, then delete the key. Close Regedit and reboot.
Alternative Fix: Use Process Monitor to Find the Culprit
If the error doesn't name a specific file, download Process Monitor from Microsoft Sysinternals. Filter by CO_E_APPNOTFOUND or 0X800401F5 while reproducing the error. Look for a CLSID or AppID value in the last few events. That GUID leads you to the registry key to delete.
Alternative Fix: Run System File Checker
Sometimes the problem is a corrupted system COM file. Run sfc /scannow in an elevated Command Prompt. If it finds integrity violations, let it repair them, then restart. This fixed the error on a Windows 10 22H2 machine of mine after a failed Office 2016 update.
Prevention Tip
Before uninstalling any app that uses COM (like Microsoft Office, Adobe products, or developer tools), close all shortcuts and document handles. Use the official uninstaller—never delete the folder manually. After uninstalling, run a registry cleaner (I prefer CCleaner's registry tool, but any will do) to sweep up orphaned CLSID entries. Do this once a month and you'll rarely see 0X800401F5 again.