Fix File Has No Associated Program in Windows
In this article
If you see “This file does not have a program associated with it for performing this action” when opening a file in Windows, the file type’s association is missing or corrupted. The fix is to re-associate the file extension with a compatible app using Windows Settings, the “Open with” dialog, or the registry in more stubborn cases.
Why This Error Appears
Windows relies on file associations to know which program should open each file extension (like .pdf, .jpg, or .docx). When you double-click a file, Windows looks up the extension in the registry and launches the associated app. The error occurs when:
- The registry entry for that extension is missing or deleted.
- The associated program is uninstalled or moved, leaving a broken path.
- A third-party app hijacked the association and then failed to set a new one.
- The file is on a network drive or removable media where the association is not recognized.
- Group Policy or a system image (like a Windows installation ISO) restricts certain associations.
This problem can affect any file type, but it is especially common with less common extensions, shortcut files (.lnk), and files opened from cloud-synced folders.
How File Associations Work in Windows
Windows stores file associations in the registry under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts and HKEY_CLASSES_ROOT. Each extension key contains a “UserChoice” subkey that records the ProgID (a string that identifies the program). When you change an association via Settings, Windows updates these keys.
Modern Windows versions (10 and 11) also use a “default app” system in the Settings app. This system is more user-friendly but can be slower to update when many files are involved. For system files like .exe and .lnk, Windows protects the associations and may revert changes unless you use the built-in “Default apps” page.
How to Fix It: Step-by-Step
Start with the simplest method and move to more advanced ones only if needed.
- Right-click the file and choose “Open with”. If a program appears in the list, select it and check “Always use this app to open .xxx files”. This fixes the association for that user.
- Use Windows Settings: Go to Settings > Apps > Default apps. Scroll to the bottom and click “Choose defaults by file type”. Find the extension, click the current app (or the “Choose a default” button), and select the correct program. On Windows 11, you can also search for the app and set associations from its page.
- Reset the app’s defaults: In the same Default apps page, find the program (e.g., Photos, Notepad) and click “Reset” to restore all its associations. This can fix multiple broken links at once.
- Use the classic “Open with” dialog: Right-click the file, choose “Open with”, then “Choose another app”. If the app is not listed, click “More apps” and then “Look for another app on this PC” to browse to the executable.
- Check if the app is installed and working. If the app was uninstalled or updated, reinstall it. Sometimes a simple reboot after reinstalling fixes the association.
Advanced Fixes for Stubborn Cases
If the above steps fail, the registry may have stale entries. Use the following methods with caution.
- Delete the UserChoice key: Open Registry Editor (regedit) and navigate to
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.ext(replace .ext with your extension). Delete the “UserChoice” subkey. Windows will then use the default association from HKEY_CLASSES_ROOT. This often works when the error persists because the UserChoice points to a non-existent program. - Use “assoc” and “ftype” commands: Open Command Prompt as administrator. Type
assoc .ext=to see the current association, thenassoc .ext=ProgIDto set it. To find the ProgID, checkHKEY_CLASSES_ROOT\.extfor the default value. This is a manual method that gives you full control. - Reset the entire file association database: In some cases, you can use the
assoccommand without arguments to list all associations, but there is no built-in “reset all” button. You may need to reinstall the apps or use a system restore point.
Always back up the registry before editing it. A wrong change can cause other issues.
Common Problem: The “.lnk” Shortcut Error
Many users see this error when opening shortcuts (.lnk files) on the desktop or Start menu. This is often caused by a corrupted registry entry for the .lnk extension. The quickest fix is to:
- Open Registry Editor.
- Navigate to
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.lnk. - Delete the entire “UserChoice” subkey (or the whole .lnk key if you are comfortable).
- Restart Explorer (via Task Manager) or reboot.
If that does not work, you can also run the built-in System File Checker (sfc /scannow) to repair system files, which sometimes restores default associations.
Preventing Future Association Problems
To avoid this error in the future:
- Always use the “Open with” dialog to choose a default app, rather than manually editing the registry.
- When uninstalling a program, check if it is the default for certain file types and set a new default before uninstalling.
- Be cautious with “registry cleaner” tools that may remove valid association keys.
- Keep your Windows and apps updated, as updates sometimes fix association bugs.
Frequently Asked Questions
Why does this error happen after a Windows update?
Windows updates can reset or change default apps, especially if the update changes how a file type is handled. This is usually intentional (e.g., new default app for PDFs) but can leave broken associations if the old app is no longer present. Re-setting the default via Settings usually fixes it.
Can I fix this without admin rights?
Yes, if the file type is not system-protected. Changing associations for your user account does not require administrator privileges. You can use the “Open with” dialog or Settings. However, if the issue is caused by a system policy, you may need admin rights to change it.
What if the file type is unknown to Windows?
If the extension is not recognized, Windows may show this error because there is no association at all. You can either choose a program manually via “Open with”, or if the file is a plain text file, you can open it with Notepad. To make Windows recognize it, you can create a new association in Settings by selecting the app.
Is it safe to edit the registry to fix this?
Editing the registry is safe if you follow the exact steps and back up the registry first. Deleting the wrong key can cause other issues, so only delete the specific UserChoice key for the problematic extension. If you are unsure, use System Restore first.
Why does the error appear for .exe files?
.exe files are executable programs, and Windows normally opens them directly. If you see this error for .exe, it often indicates a deeper system issue, such as a malware infection or corrupted registry. Try running a full antivirus scan and then use the “assoc” command to reset the .exe association to “exefile”.