"Register" an .exe so you can run it from any command line in Windows
You can add the following registry key:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\myexe.exe
In this key, add the default string value containing the path to the exe file.
You need to make sure that the exe is in a folder that's on the PATH
environment variable.
You can do this by either installing it into a folder that's already on the PATH
or by adding your folder to the PATH
.
You can have your installer do this - but you may need to restart the machine to make sure it gets picked up.
Windows 10, 8.1, 8
Open start menu,
- Type
Edit environment variables
- Open the option
Edit the system environment variables
- Click
Environment variables...
button - There you see two boxes, in
System Variables
box findpath
variable - Click
Edit
- a window pops up, click
New
- Type the Directory path of your
.exe
orbatch
file ( Directory means exclude the file name from path) - Click
Ok
on all open windows andrestart your systemrestart the command prompt.