Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This question already has an answer here:

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?

share|improve this question

marked as duplicate by Karan, gronostaj, Nifle, Excellll, teylyn Jul 15 '13 at 23:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
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

1 Answer 1

up vote 2 down vote accepted

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
share|improve this answer
    
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.