La sessione di domande e risposte di oggi ci viene fornita per gentile concessione di SuperUser, una suddivisione di Stack Exchange, un raggruppamento di domande e risposte basato sulla comunità.
La domanda
Il lettore SuperUser mt025 vuole sapere come la finestra di dialogo Esegui sa dove sono le applicazioni che non si trovano nel sistema PATH di Windows:
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?
La risposta
Il collaboratore di SuperUser w32sh ha la risposta per noi:
When you execute a command from the Run Dialog, the system looks at the App Paths registry keys here:
HKEY_CURRENT_USERSOFTWAREMicrosoftWindowsCurrentVersionApp Paths
and
HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionApp Paths
Example
HKEY_CURRENT_USERSOFTWAREMicrosoftWindowsCurrentVersionApp Pathsfilezilla.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.
Hai qualcosa da aggiungere alla spiegazione? Audio disattivato nei commenti. Vuoi leggere più risposte dagli altri utenti di Stack Exchange esperti di tecnologia? Controlla la discussione completa qui.