If you're trying to run an executable by only specifying its name, Windows looks for the file in the following locations:
- The current working directory.
- The
Windows directory only (no subdirectories are searched).
- The
Windows\System32 directory.
- Directories listed in the PATH environment variable.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths (also HKEY_CURRENT_USER since Windows 7)
Microsoft actually recommends "registering" applications in the App Paths subkey to avoid the need for applications to modify the system PATH environment variable. The application's installer will register the executable.