Windows – How to start Notepad++ from cmd

command linenotepadwindows-vista

I can start the regular Notepad from cmd.

C:\Windows>notepad

I can also start it from the run prompt.

  1. Win+R
  2. notepad
  3. Enter

I want to be able to do the same with the Notepad++. I can start it from the run prompt, but I can't start it from cmd.

I can also open a specific file in Notepad from cmd.

C:\Windows>notepad d:\mytext.txt

I want to be able to do the same with Notepad++.

Is this possible, and what can I do to enable this?

Best Answer

You could add C:\Program Files (x86)\Notepad++ to your PATH environment variable.

For example, you could run the following on the command prompt:

set PATH=%PATH%;C:\Program Files (x86)\Notepad++

For further options, see What are PATH and other environment variables, and how can I set or use them?