Files · Windows 11
Fix a file that opens with the wrong app no matter how many times you set the default
A file that keeps opening in the wrong app after you have set the default more than once usually means the association itself is damaged or an app is resetting it. Set it by file type first, reset the offending app next, and rebuild the association only if it still will not stick.
What you need
- One example file of the type that misbehaves. Keep it on the desktop so every test opens the same file.
- The name of the app you actually want. And the name of the app that keeps taking over — the pair is the clue.
- A note of when it resets. Whether the default survives until a restart, or breaks the moment the other app opens, separates the branches.
Read the problem before you touch it
- Set it once the Settings way and watch what happens. Right-click the file, choose Open with, pick your app, and select Always. Microsoft sets out this route and the by-type route in Change default apps in Windows. If the file opens correctly now but not after a restart, something is resetting the choice rather than the choice failing.
- Check whether it is one file or the whole type. Create or find a second file with the same extension and open it. If only the first file misbehaves, that file's own properties are the problem. If every file of the type opens wrong, the association for the type is damaged.
- Notice whether the unwanted app was recently installed or updated. An app that registers itself as the default on every launch will undo your setting each time it runs. Test by setting the default, restarting the PC without opening that app, and opening your file first.
The simple fixes, in order
- Set the default by file type in Settings. Go to Settings > Apps > Default apps, search for the file extension, and set your app there. This writes the association in a different place from the right-click route and often sticks when that route does not.
- Repair or reset the app you want to keep. In Settings > Apps > Installed apps, open your preferred app's Advanced options and use Repair first. If the option exists and the association still will not point to it, use Reset, then set the default again.
- Uninstall and reinstall the app that keeps taking over. If one app reclaims the file type every time it launches, uninstall it from Installed apps, restart, set your default, and confirm it sticks. Reinstall the other app only if you need it, and decline any set-as-default prompt it shows during setup.
- Set the default again after any app update. App updates can legitimately reset associations once. Set the default one more time after an update before treating the problem as ongoing.
The advanced route
- Reset all default apps, then set yours first. In Settings > Apps > Default apps, scroll to Reset all default apps and use Reset. Restart, then set the default for your file type before opening the app that used to take over, so your choice is the first one written.
- Check for a second copy of the app. An app installed both from the Microsoft Store and from the maker's installer can fight itself over associations. In Installed apps, look for duplicate entries for the same program, uninstall the one you do not use, restart, and set the default again.
- Repair system files if defaults reset for many file types at once. When several unrelated file types all lose their defaults together, open Windows Terminal as administrator, run
DISM /Online /Cleanup-Image /RestoreHealth, then runsfc /scannow. Microsoft documents both tools in Using System File Checker in Windows.
End state
- Your example file opens in the app you chose, by double-click, three times in a row.
- The default survives a restart and survives opening the other app.
- Settings > Apps > Default apps shows your app against the file extension.
When it goes wrong
- The app you want is missing from the list of choices. Browse to it directly from the Open with dialog using Choose an app on your PC. If it still will not register, repair or reinstall that app — the fault is in its registration, not in Windows' list.
- Only files from one sender or drive misbehave. Those files may carry a different extension than they appear to. Turn on file name extensions in File Explorer's View menu and check what the files really are before changing any default.
- The default resets at the same time every day. A workplace policy or a cleanup tool is rewriting associations on a schedule. On a work PC, that is your IT team's setting to change, not a local fault.
Related fixes
-
Fix Windows Security that opens blank or will not open
When Windows Security opens to a blank page, or closes as soon as it starts, the app package or its service is usually damaged, not the protection itself. Reset the app first, check the service next, then repair the system files if the window still will not load.
-
Fix an app that opens and closes instantly when you launch it
An app that flashes open and vanishes is crashing in its first seconds, long before its window can stay up. Repair or reset the app first, read the exact fault in Event Viewer next, and change the graphics or reinstall route only for the branch that matches.
-
Fix a drive that shows the wrong amount of free space in File Explorer
File Explorer's free space figure can disagree with reality when the Recycle Bin, restore points, or a stuck file system count is inflating the used side. Compare the numbers first, clear the quiet hoarders next, then repair the count itself.
-
Fix a game that always launches on the wrong monitor
A game opens on the monitor you do not play on because Windows and the game disagree about which display is primary, or the game remembers the screen it last closed on. Set the primary display in Windows first, then reset the game's own saved position if it keeps its own idea.
Sources
- Microsoft Support, Change default apps in Windows — setting defaults by app and by file type, and resetting all default apps.
- Microsoft Support, Using System File Checker in Windows — running DISM and SFC to repair missing or corrupted system files.