Are you a huge fan of Notepad++ like I am?

Well, if adding Notepad++ to the path is not enough for you:

c:\> set path=%path%;c:\Program Files (x86)\Notepad++

And registering the Notepad++ shell extensions:

regsvr32.exe "c:\Program Files (x86)\Notepad++\NppShell_06.dll"

Then, you may want to create a command line alias, so instead of typing:

c:\> notepad++ something.txt

You only type:

c:\> np something.txt

And still enjoy the benefits of not renaming the notepad.exe binary.

Option 1

As ITpraktyk suggested me, create a link using mklink from and Administrator command prompt:

c:\> mklink "c:\windows\system32\np.exe" "c:\program files (x86)\Notepad++\notepad++.exe"

Fast and simple.

Option 2

Step 1

Create a batch script that registers the alias and save it as notepadAlias.cmd

@echo off
doskey np=notepad++ $*

Step 2

From an administrator command prompt run the following command:

reg add "HKCU\Software\Microsoft\Command Processor" /v Autorun /t REG_SZ /d "c:\path\to\notepadAlias.cmd" /f

Make sure to replace C:\path\to with the path where you saved the batch script.

This registry value will execute the batch script each time a command line is started.

Step 4

Open a new command line, type np and see Notepad++ come to the foreground.