How does Windows find the path for executables like iexplore.exe?
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).
Related videos on Youtube
Kyle Delaney
Updated on September 18, 2022Comments
-
Kyle Delaney over 1 year
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.
-
Kyle Delaney about 7 yearsI think you may have misunderstood me. I'm not saying I can't get Internet Explorer to run from the run dialog. I'm saying I can. And I'm asking why that is, since it isn't found in %SystemRoot% like you said. It's also strange that I can run it from the run dialog but not from command line.
-
Kyle Delaney about 7 yearsTry it yourself. Press Win+R and type iexplore.
-
Mr. Mendelli about 7 yearsTried it, but it doesn't seem to work. It may function differently on Windows 10. As far as running programs directly from run, I believe there may be a list of pre-defined programs that can be executed this way. It's probably registry-based.