Ash Saf
Ash Saf

Reputation: 162

Why does "start firefox" command works in Windows command prompt?

I'm curious why commands like "start iexplore" and "start firefox" work in Windows cmd. They're not standalone commands. If you try to type in just "firefox", you'll get: "'firefox' is not recognized as an internal or external command, operable program or batch file."

This leads to the conclusion that this is a special behaviour of the "start" command. My first guess was that it works in a similar way to how the %path% variable is used, having known directories to search in. I ruled it out easily by trying to run "start [executable]" for another executable located in the same directory as firefox.

My conclusion is that somewhere on my computer there's a list of designated file paths, that can be started by simply typing their file name after the "start" command, instead of the entire path.

Imagine the potential of being able to add things to this list.. Anyone knows where I can find it?

Upvotes: 4

Views: 2051

Answers (1)

MC ND
MC ND

Reputation: 70943

It is in the registry

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\

Under this key there are defined applications that can be invoked without need to change the path environment variable.

Usual invocation (typing the name in the command line) will not search inside this list, but call to start command, windows Run dialog or call from anything that uses the ShellExecute or ShellExecuteEx API calls, will check for applications defined in this list.

Upvotes: 6

Related Questions