Saturday 21 October 2017

windows - How does the Run dialog know where applications are?


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 run, but they are not in the PATH, and they don't work in CMD.


firefox
winword
iexplore

How does Run know where these files are?



Answer



When you execute a command from Run dialog, the system looks at the App Paths registry key 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's not found, it looks at each folder included in the PATH.


Whereas the Command Prompt doesn't reference these registry keys. It only searches the PATH.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...