How can you make a .exe file accessible from any location in the Windows command window? Is there some registry entry that has to be entered?
To get global bash-like aliases in Windows for applications not added to the path automatically without manually adding each one to the path, here's the cleanest solution I've come up with that does the least amount of changes to the system and has the most flexibility for later customization:
mkdir c:\aliases
setx PATH "c:\aliases;%PATH%"
To start C:\path to\my program.exe, passing in all arguments, opening it in a new window, create c:\aliases\my program.bat file with the following contents(see NT Start Command for details on the start commmand):
@echo off
start "myprogram" /D "C:\path to\" /W "myprogram.exe" %*
To start C:\path to\my program.exe, passing in all arguments, but running it in the same window (more like how bash operates) create c:\aliases\my program.bat file with the following contents:
@echo off
pushd "C:\path to\"
"my program.exe" %*
popd
If you don't need the application to change the current working directory at all in order to operate, you can just add a symlink to the executable inside your aliases folder:
cd c:\aliases\
mklink "my program.exe" "c:\path to\my program.exe"