If your files keep opening in Notepad when you double-click them, the file type association is set wrong or missing. You can fix this by reassigning the correct program through Windows Settings or the Open With dialog. Below is a complete guide to diagnosing and correcting file associations in Windows 10 and Windows 11.
Why Files Open in the Wrong Program
Windows uses file associations to decide which app launches when you open a file. Each file extension (like .docx, .pdf, or .jpg) is mapped to a default program. This mapping can break or change for several reasons:
- A new app hijacks the association during installation without asking.
- You accidentally chose “Always use this app” for the wrong program.
- A system update resets or corrupts the registry entries that store associations.
- You changed the default app in Settings, but the change didn’t apply to all file types.
- Third-party “file manager” or “optimizer” tools modify associations without consent.
Notepad is often the fallback because it is a lightweight, always-present text editor. If Windows can’t find the correct program, it may default to Notepad for many file types, especially those that are text-based like .log, .ini, or .cfg.
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. When you double-click a file, Explorer reads the extension, looks up the associated program, and launches it. If the association is missing or broken, you may see a dialog asking you to choose an app, or Windows silently opens Notepad.
In Windows 10 and 11, the primary user interface for managing associations is Settings > Apps > Default apps. Here you can set defaults by file type, by protocol, or by app. The system also maintains a list of “recommended” defaults that can override your choices after major updates, which is a common cause of unexpected changes.
How to Assign the Correct Program (Step-by-Step)
Follow these steps to fix a file association. The method works for most file types in both Windows 10 and 11.
- Right-click the file that opens in Notepad. Select Open with from the context menu.
- In the dialog, choose the correct program from the list. If it’s not listed, click Choose another app (Windows 11) or More apps (Windows 10).
- Check the box that says Always use this app to open .ext files (where .ext is the actual extension).
- Click OK or Open. The file should now open with the selected program.
If the correct program is not in the list, click Look for another app on this PC and browse to the program’s executable file (e.g., C:\Program Files\Microsoft Office\root\Office16\WINWORD.EXE for Word).
Changing Default Apps in Settings
For a more permanent fix, use the Settings app to set defaults by file type:
- Open Settings (Win + I).
- Go to Apps > Default apps.
- Scroll down and click Choose defaults by file type.
- Find the extension (e.g., .pdf, .docx) in the list. Click the current default (which may show Notepad) and select the correct app.
- If the app you want is not listed, click Choose an app and browse to it.
You can also set defaults by app: click the app (e.g., Microsoft Word) and then assign all file types it supports. This is useful if you want one program to handle many extensions at once.
Common Problems and Quick Fixes
Sometimes the standard steps don’t work. Here are frequent issues and solutions:
- “Open with” doesn’t list the right app: Click “Choose another app” and then “Look for another app on this PC” to manually locate the .exe file.
- The association resets after restart: This often happens when another app (like a PDF reader or media player) is set to “auto-launch” and reassigns itself. Check the app’s settings for “set as default” and disable it.
- Windows won’t let you change the default for certain file types: Some system files (like .exe, .bat) are protected. Do not attempt to change these unless you are an advanced user.
- Multiple apps claim the same extension: Use the “Choose defaults by file type” list to explicitly set the one you want.
- The file still opens in Notepad after changing: Clear the file type cache. Open Command Prompt as administrator and run
ie4uinit.exe -show, then restart Explorer (taskkill /f /im explorer.exe & start explorer.exe).
Using “Open With” vs. Changing Defaults
There is a difference between opening a file once with a specific app and permanently changing its default. The “Open with” dialog without the “Always” checkbox only affects that one file. To change the default for all files of that type, you must check the box or use Settings. If you frequently use two programs for the same file type (e.g., a viewer and an editor), you might prefer to keep the default as one and use “Open with” for the other.
When to Reset All Defaults
If many file types are misassigned, you can reset all Windows default apps to the original Microsoft set. In Settings > Apps > Default apps, click the Reset button at the top. This restores the default Microsoft apps (Notepad, Photos, Edge, etc.) for all file types. After resetting, you will need to reassign your preferred apps for each file type you use. This is a good troubleshooting step if a third-party app has taken over many associations.
Frequently Asked Questions
Why does Notepad keep opening my .csv files?
CSV files are text-based, and Windows may default to Notepad if no spreadsheet app is installed or if the association was changed. To fix, right-click a .csv file, choose Open with, select Excel (or Google Sheets if you have it), and check “Always use this app.” If Excel isn’t listed, use “Choose another app” and browse to EXCEL.EXE.
Can I make a file always open with a program that isn’t in the list?
Yes. In the “Open with” dialog, click “Choose another app” and then “Look for another app on this PC.” Navigate to the program’s installation folder and select the .exe file. It will then appear in the list and can be set as default.
Why does my file association change after a Windows update?
Windows updates sometimes reset default apps for security or compatibility reasons. Microsoft may also change the default for new file types. To prevent this, you can set your defaults again after the update. There is no built-in way to permanently lock associations, but you can use the Settings app to change them back quickly.
Is it safe to edit the registry to fix file associations?
Editing the registry is possible but risky. Incorrect changes can break other associations or cause system instability. It’s safer to use the Settings app or the Open With dialog. If you must edit the registry, back it up first and only modify the specific extension key under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts.
What if the file type is not listed in “Choose defaults by file type”?
Some extensions are hidden or not registered. You can still change the association by right-clicking the file, choosing Open with, and selecting the app with the “Always” checkbox. This should create the association even if it wasn’t listed before.
How do I stop Notepad from opening .txt files when I want another editor?
Right-click a .txt file, choose Open with, select your preferred editor (like Notepad++ or VS Code), and check “Always use this app.” If you want a different app for each file type, repeat the process for each extension.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- China’s IPv9 Decimal Network Project Explained
- Fix Wired Earbuds That Only Work in One Ear
- What to Check Before Buying the Dip in Indian Shares
- Cool Raspberry Pi Projects: 15 Ideas for Any Skill Level3
- Terraform vs Kubernetes: Key Differences
- Mortal Shell 2: What the Immaculate Crown Unlocks