"Register" an .exe so you can run it from any command line in Windows

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?


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,

  1. Type Edit environment variables
  2. Open the option Edit the system environment variables
  3. Click Environment variables... button
  4. There you see two boxes, in System Variables box find path variable
  5. Click Edit
  6. a window pops up, click New
  7. Type the Directory path of your .exe or batch file ( Directory means exclude the file name from path)
  8. Click Ok on all open windows and restart your system restart the command prompt.

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 have to put your .exe file's path into enviroment variable path. Go to "My computer -> properties -> advanced -> environment variables -> Path" and edit path by adding .exe's directory into path.

Another solution I personally prefer is using RapidEE for a smoother variable editing.


Rather than putting the executable into a directory on the path, you should create a batch file in a directory on the path that launches the program. This way you don't separate the executable from its supporting files, and you don't add other stuff in the same directory to the path unintentionally.

Such batch file can look like this:

@echo off
start "" "C:\Program Files (x86)\Software\software.exe" %*