When I try to start a program with start command without specifying path, for some programs it works and for some programs it doesn't work.

I know that if those programs are in my PATH list or in current directory, I don't have to type the path.

But start command works for some programs even if those aren't in current directory or in my PATH list. What is the reason for this?

  • Related (actually, close to a duplicate...) – Bob Jul 14 '13 at 11:42
  • @Bob, you're right. It's close to a duplicate, but I couldn't find it. The title means something else. – sakibmoon Jul 14 '13 at 11:54

It searches the App Paths registry key.

Finding an Application Executable

When the ShellExecuteEx function is called with the name of an executable file in its lpFile parameter, there are several places where the function looks for the file. We recommend registering your application in the App Paths registry subkey. Doing so avoids the need for applications to modify the system PATH environment variable.

The file is sought 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.
  • Recommended: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
  • what is ShellExecuteEx function? – sakibmoon Jul 14 '13 at 11:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.