Windows Run Dialog – How Does the Windows Run Dialog Locate Executables?

run-dialogwindows

When I enter "firefox" in the windows run dialog (i.e. the dialog that appears when you hit windows+R), firefox will launch.

However, "firefox.exe" is not in my %path% because when I type "firefox" in cmd.exe, I get

'firefox' is not recognized as an
internal or external command, operable
program or batch file.

So apparently an executable doesn't need to be found in the windows %path% in order to be discoverable by the run dialog. How does this work?

Best Answer

Apparently the run dialog checks not only the %path% environment variable, but also the "App Path" registry key. From a techrepublic article about the run dialog:

You can launch some third-party applications by typing the name of the executable file in the Open text box and clicking OK—even though the paths to these applications don’t appear in the path environment variable. The reason that this is possible is because the installation procedure for some applications adds the executable file's path to a special registry key called App Paths.

The relevant locations in the registry are HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths and HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\App Paths (this last one being specific to the user). You can add your own "app paths" there with regedit.