How Does the Run Dialog Know Where Applications Are?

how-does-the-run-dialog-know-where-applications-are photo 1

The Run Dialog can serve as an easy and very useful way to open programs on your computer, but just how does it know where those applications are located at on your system? Today’s SuperUser Q&A post has the answer to a curious reader’s question.

Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.

The Question

SuperUser reader mt025 wants to know how the Run Dialog knows where applications are that aren’t in Windows’ system PATH:

As a power user, I frequently use the Run Dialog. I can understand why the following commands work, as they are in the PATH environment variable.

  • mspaint
  • diskmgmt.msc
  • explorer

These commands also work in CMD.

The commands below work in the Run Dialog, but they are not in the PATH environment variable, and they do not work in CMD.

  • firefox
  • winword
  • iexplore

How does Run know where these files are?

The Answer

SuperUser contributor w32sh has the answer for us:

When you execute a command from the Run Dialog, the system looks at the App Paths registry keys here:

  • HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths

and

  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths

Example

  • HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\filezilla.exe

(Default) value data has the full path to the executable. If it is not found, it looks at each folder included in the PATH, whereas CMD (the Command Prompt) does not reference these registry keys, it only searches the PATH.


Have something to add to the explanation? Sound off in the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.

More stories

12 of the Biggest PC Myths That Just Won’t Die

Computers are like anything else. Myths and urban legends have built up over time, passed from person to person. Some myths once had a grain of truth, but are no longer true thanks to technological progress.

Forget Chromebooks: Chrome OS is Coming to Windows

Google didn’t announce any shiny new Chromebooks at Google I/O. Instead, they highlighted their two big “platforms” — Chrome and Android. Whether you’re using Windows, Linux, or Mac, Google will be bringing the Chrome OS experience to you.

How to Unsubscribe from Email Newsletters the Correct Way

Do you get too many newsletters and other promotional emails? These emails aren’t technically “spam” — they’re from legitimate organizations. Thanks to the US CAN-SPAM act, every legitimate company offers a consistent way to unsubscribe from their newsletters.

How to Run Malwarebytes Alongside Another Antivirus

Malwarebytes Anti-Malware is a great security tool that’s particularly effective against “potentially unwanted programs (PUPs)” and other nasty software traditional antivirus programs don’t deal with. But it’s intended to be used alongside an antivirus and doesn’t replace one entirely.

How to Use the New Task Manager in Windows 8 or 10

The Task Manager in Windows 8 and 10 has been completely overhauled. It’s easier-to-use, slicker, and more feature-packed than ever. Windows 8 may be all about Metro, but the Task Manager and Windows Explorer are better than ever.

22 Common Network Jargon Terms Explained

Computer networking is filled with jargon that isn’t self-explanatory. Here’s a quick overview of many of the terms you’ll see when you glance at the network status information on any device.

How To Troubleshoot Internet Connection Problems

Internet connection problems can be frustrating. Rather than mashing F5 and desperately trying to reload your favorite website when you experience a problem, here are some ways you can troubleshoot the problem and identify the cause.