If I type iexplore into the run window, it runs Internet Explorer. I presume that means C:\Program Files\Internet Explorer is in my path environment variable, but it's not. I checked both my user variables and my system variables. So how does Windows know where to look for this sort of thing?
I suppose I should mention I'm using Windows 8.1 at the moment.
Answer
The computer has used Application Registration with this program. To see a list of such executable files, check out HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
e.g.:
reg QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths"
That shows the executables. To show more information about then, use:
reg QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths" /s
Actually, that is just one of the locations that are checked for executable files. The MSDN page on Application Registration has a section called “Finding an Application Executable”, which mentions this as well as some other locations that can get used by the “ShellExecuteEx” function. That function is used by some programming code, including the Run dialog box, but may not be what is used by the traditional command prompt, so that is why you may get different results for a specific command (based on where you are trying to run the command from).
No comments:
Post a Comment