I have added notepad++.exe
to my Path in Environment variables.
Now in command prompt, notepad++.exe filename.txt
opens the filename
Given that you added notepad++.exe to your PATH variable, it's extra simple.
Create a file in your System32 folder called np.bat
with the following code:
@echo off
call notepad++.exe %*
The %*
passes along all arguments you give the np
command to the notepad++.exe
command.
EDIT: You will need admin access to save files to the System32 folder, which was a bit wonky for me. I just created the file somewhere else and moved it to System32 manually.