I would like to be able to right-click on a .cmd file in win10 (or windows server 2019), choose edit and have notepad++ open the file. I have a mixture of file types (as in 'nix text files) that are accessed this way in a windows interface, hence the use of notepad++. Life was simpler when I could just do the same with .cmd files, literally decades ago with another text editor. I've recently had a shift in my working environment, and find myself working in windows again.

So, please don't post an "answer" that I should just look further down the context menu for Edit with Notepad++. Clearly I need to refresh my knowledge of the newish nooks and crannies buried in the registry (which have definitely changed since last I looked).

| |

Just because I could not find a direct answer on stack exchange, and because there are so many low-quality answers that pop up elsewhere, and also so I don't have to waste so much time looking again for this again (note there are several embedded assumptions here, so this is only a hint):

open regedit as admin.

navigate to:


replace %SystemRoot%\System32\NOTEPAD.EXE %1

with "C:\Program Files\Notepad++\notepad++.exe" %1

exit and test.

or save this as a .reg file and merge it:

Windows Registry Editor Version 5.00


This was actually tested on server 2019

| |
  • Please have a look at Can I answer my own question? and come back two days later and check as answered. – help-info.de Jul 7 at 8:02
  • unlikely, but if the stars align correctly, I'll accept my own answer. – BISI Jul 7 at 15:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.