Understanding File Associations in Windows 10
Windows 10 manages which program launches when you double-click a file through the Default Apps settings. This database is stored in the Windows Registry under keys like HKEY_CLASSES_ROOT\.txt. When an update occurs, or if another text editor (like VS Code or Sublime Text) was installed recently, it may have hijacked the association for .txt files. This results in Notepad++ being ignored even if it was previously your preferred editor.
Unlike older versions of Windows, Windows 10 does not always present a simple list of all installed applications when changing defaults. Instead, it often groups them by category or requires you to search specifically for the app name. If the standard method fails, manual intervention is necessary to break the incorrect link and establish a new one.
Method 1: Using the Default Apps Settings
The most straightforward way to fix this issue is through the modern Settings interface. This method ensures that the system-wide default is correctly updated.
- Open Settings: Press
Win + Ito open the Windows Settings window. - Navigate to Apps: Click on
Appsin the left-hand menu, then selectDefault appsfrom the right pane. - Search by File Type: Scroll down to the bottom of the page and click on the link labeled
Choose default apps by file type. - Locate .TXT: Use the search box at the top of the list to find
.txt. It may take a moment for the list to populate. - Change the App: Click on the current icon next to
.txt(which might be WordPad or Notepad). A list of recommended apps will appear. SelectNotepad++from the list. If it does not appear, clickLook for another app on this PCand navigate to the installation directory, typicallyC:\Program Files\Notepad++\notepad++.exe.
This process updates the registry key directly. After completing these steps, double-clicking any .txt file should launch Notepad++ immediately. For more information on managing how Windows opens files, see How to Add Additional Programs to Open Files Instead of Always Choosing Another App in Windows 10.
Method 2: The Right-Click Context Menu
If the Settings app is confusing or the file type is not listed, you can force the association using the file itself. This method is particularly useful if you have many specific file types that need correction.
- Find a Text File: Locate any
.txtfile in File Explorer. - Right-Click: Right-click the file and select
Open with, then chooseChoose another app. - Select Notepad++: In the dialog box, scroll down and look for Notepad++. If you do not see it, click
More appsand thenLook for another app on this PCto browse to the executable. - Set as Default: Crucially, check the box that says
Always use this app to open .txt filesbefore clicking OK. This step ensures the change persists across all future instances of the file type.
This action writes the correct handler to the registry. It is faster than navigating the full Settings menu and works reliably even if the system cache is slightly corrupted.
Method 3: Reinstalling or Repairing Notepad++
Sometimes, the installation files themselves are damaged, or the uninstaller failed to clean up previous associations. Running the installer again can repair these issues.
Download the latest version of Notepad++ from the official website. Run the installer as an administrator. During the installation wizard, look for options related to file associations. Ensure that checkboxes for .txt and other common text formats are selected. Complete the installation. The installer will automatically register the application with Windows and overwrite any incorrect registry entries that were causing the conflict.
Troubleshooting Persistent Issues
If none of the above methods work, consider whether a recent system reset or corruption event affected your user profile. Corrupted system files can sometimes prevent proper registration of applications. In such cases, running the System File Checker tool via Command Prompt (admin) with sfc /scannow may help restore integrity to the OS components involved in file handling. For guidance on recovering from deeper system errors, refer to How to Fix Corrupted Files After a Windows 10 Reset.
Frequently Asked Questions
Why does Notepad++ open but the file is empty?
This usually indicates that you opened the wrong file path or that the encoding is unreadable. Ensure you are selecting the correct document from the file dialog. If the file contains binary data, Notepad++ may display it incorrectly; try changing the Encoding menu to UTF-8 or ANSI.
Can I associate multiple file extensions with Notepad++ at once?
Yes, after setting .txt as the default, you can repeat the "Open with" process for .log, .csv, or .ini files. Each extension must be associated individually unless you use a third-party utility designed to batch-manage file associations.
What if Notepad++ does not appear in the "Open with" list?
If the app is missing, it may not be fully installed or registered. Navigate to C:\Program Files\Notepad++ and verify that notepad++.exe exists. If it is there, run the installer again to force registration. If the file is missing, download a fresh copy from the official site.
Does disabling Windows Defender affect file associations?
No, Windows Defender does not manage file associations. However, aggressive security software might block the execution of scripts that modify registry keys. If you suspect interference, temporarily disable real-time protection while attempting to change the association, then re-enable it immediately after.
How do I revert to the old Windows 7 style choice dialog?
Windows 10 removed the legacy "Open With" dialog in favor of the modern Settings interface. You cannot natively revert this behavior without third-party tools. However, the "Choose another app" context menu provides a similar experience by listing available applications directly.