How to Replace Windows Notepad with Notepad++

Notepad++ is one of the most popular text editors in the world. It can edit a large number of file formats. It features syntax highlighting, tabbed interface, powerful search and replace functions and more. Being an open-source program that comes with all these features, it has won over the hearts of almost all the Windows users. Personally, I have been using it for at least last ten years and I have never thought of switching to any other text editor.

Fortunately, starting with the latest version of Notepad++ (version 7.5.9), the developers have added two special command line switches that can be used to replace Windows Notepad with Notepad++. This takes advantage of the debugger feature of Image File Execution Options (IFEO). No files are replaced and no irreversible changes are made to the system. It just requires a single registry value to be added.

Tip: If you do not want to make changes to the registry manually, then there is another easier method offered by Notepad++ : https://www.trishtech.com/2017/04/how-to-replace-notepad-with-notepad-in-windows-10/.

Here is how you can replace Windows Notepad with Notepad++ :

For 64-bit version of Windows:
  1. Download and install 64-bit version of Notepad++ from https://notepad-plus-plus.org/. Choose the default installation folder.
  2. Click on Start, type cmd.exe, right-click on cmd.exe and select Run as administrator. This will open elevated command prompt window.
  3. Type the following in the elevated command prompt window and then press Enter:
    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

    Replace Notepad with Notepad++

For 32-bit version of Windows:
  1. Download and install 32-bit version of Notepad++ in its default location.
  2. Launch elevated command promt as previously mentioned (click on Start, type cmd.exe, right-click on cmd.exe and select Run as administrator).
  3. Type the following in the elevated command prompt window and then press Enter:
    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

This is it, now Windows Notepad will no longer launch. All attempts to launch Notepad with actually launch Notepad++. If you want to revert back to Windows Notepad, then you can enter the following in the elevated command prompt:

reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /f

Replace Notepad with Notepad++

For more information and all the different cases of Notepad++ installation, you can visit the Notepad++ webpage at https://notepad-plus-plus.org/features/replace-notepad.html.