sashadereh sashadereh - 8 months ago 27
Bash Question

Where START command on Windows finds the path to executable

I would like to know where

command on Windows finds the path to executable. For example, if I run
START /W python
and have no path to
in my
environment variable it correctly finds the path and runs python. In my system it is
So, how
finds the correct path?

If I write python via my command prompt (
) it can not find the path to python.

Thank you!


When you use the START command from command line or batch file, or when you use the Run dialog, the systems follows the behaviour documented for ShellExecute or ShellExecuteEx API calls.

In general, the application will be searched in:

  1. The current working directory.
  2. The Windows directory.
  3. The Windows\System32 directory.
  4. Directories listed in the PATH environment variable.
  5. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
  6. HKEY_CLASSES_ROOT\Applications\ApplicationName.exe

For a complete description read Application Registration