Notepad++ is a popular free text editor for Windows that includes many features essential for viewing and editing code, creating and modifying macros, and working with multiple documents simultaneously. Many Notepad++ users prefer to use the app instead of the default Notepad that ships with Windows.
Rather than manually changing the default application for multiple file types, there's an easier way that allows Notepad++ to completely replace standard Notepad. Here's how it works.
Replace Notepad with Notepad++
First, make sure you're running at least Notepad++ 7.5.9. You can download the latest versions of the app from its website.
With the correct version installed, open a Command Prompt window with admin privileges. You can do this by searching for cmd via the Start Menu, right-clicking on its result, and choosing Run as Administrator.
From the Command Prompt, enter one of the following commands depending on the version of Notepad++ you have installed:
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /t REG_SZ /d "\"%ProgramFiles(x86)%\Notepad++\notepad++.exe\" -notepadStyleCmdline -z" /f
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /t REG_SZ /d "\"%ProgramFiles%\Notepad++\notepad++.exe\" -notepadStyleCmdline -z" /f
You'll see the message The operation completed successfully if everything worked. Now test out the change by performing an action that would normally launch Notepad, such as opening a text file. Instead of standard Notepad, you should see Notepad++ launch.
To undo this change and restore standard Notepad as the default text editor in Windows, open another admin Command Prompt and use the following command (which is the same for both 32-bit and 64-bit versions):
Note that the commands above assume that you installed Notepad++ in its default location. If you used a custom installation directory, edit the command accordingly to point to the correct directory.