Sim, essas informações são armazenadas no registro.
A chave
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
tem subchaves para cada aplicativo que você pode executar diretamente sem estar no caminho.
A subchave firefox.exe
tem dois valores:
(Default) C:\Program Files\Mozilla Firefox\firefox.exe
Path C:\Program Files\Mozilla Firefox\
O primeiro valor especifica o caminho completo do executável, o segundo o diretório em que ele deve ser executado.
Registro de aplicativo (Windows) explica em detalhes onde o Windows procuraria o executável firefox :
When the ShellExecuteEx function is called with the name of an executable file in its lpFile parameter, there are several places where the function looks for the file. We recommend registering your application in the App Paths registry subkey. Doing so avoids the need for applications to modify the system PATH environment variable.
The file is sought in the following locations:
- The current working directory.
- The Windows directory only (no subdirectories are searched).
- The Windows\System32 directory.
- Directories listed in the PATH environment variable.
- Recommended:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths