I'm trying to create an environment variable for my cmd so that I can launch Notepad++ without having to type in the full path.
I created an environment variable called NPAD which holds the directory where my Notepad++ executable is saved.
echo %NPAD% C:\PROG\Resources\Notepad++ the shortcut that launches it is called npedit.lnk
When I try to execute it I have to type
%NPAD%\npedit.lnk Is there a way to make it run just by using
npedit.lnk Without directly using the NPAD environment variable, for example I can use java with just
java
npedit.lnkhas to be in your%path% to work likejava. Alsoset "npad=C:\PROG\Resources\Notepad++\npedit.lnk"may be an option. I personally have a batchfilen+.batwithin my path with just one line:@"C:\PortableApps\Notepad++Portable\notepad++.exe" %*