You need to pass the parameters, try this:
doskey np=notepad++.exe $*
Edit (responding to Romonov's comment) Q: Is there any way I can make the command prompt remember so I don't have to run this each time I open a new command prompt?
doskey
is a textual command that is interpreted by the command processor (e.g. cmd.exe), it can't know to modify state in some other process (especially one that hasn't started yet).
People that use doskey
to setup their initial command shell environments typically use the /K
option (often via a shortcut) to run a batch file which does all the common setup (like- set window's title, colors, etc).
cmd.exe /K env.cmd
env.cmd:
title "Foo Bar"
doskey np=notepad++.exe $*
...