# Windows – How to make notepad++ the default editor for a Windows batch file

In Windows, if you right-click a .bat file, there's an "Edit" option, which opens the .bat file with notepad. How do I make Windows use Notepad++ instead?

Note that this is different from the question How do I set Notepad++ as the default editor?. In that question, user asks for a way to make Notepad++ the default opener for specific file types. This is not what I want here, since I expect that double-clicking on .bat files executes them.

Change the program associated to the "Edit" verb for batch files:

• Navigate to HKEY_CLASSES_ROOT\batfile\shell\edit\command.
• Modify the Default and change Value Data from %SystemRoot%\System32\NOTEPAD.EXE %1 to  "C:\Program Files (x86)\Notepad++\notepad++.exe" "%1"