You can't run Internet Explorer from the command-line or PowerShell like other programs, because it's executable isn't under C:\Windows\System32
. The variable %SystemRoot%
references the path C:\Windows\System32
, and is where things like Run and Powershell execute programs from by default because their paths start there unless specified otherwise. Internet Explorers execuables are found in:
C:\Program Files\Internet Explorer\iexplore.exe
for 64-bit
and
C:\Program Files (x86)\Internet Explorer\iexplore.exe
for 32-bit
You can execute Internet Explorer with the above paths or put these in a batch file:
%SystemRoot%\explorer.exe "C:\Program Files\Internet Explorer\iexplore.exe"
and:
%SystemRoot%\explorer.exe "C:\Program Files(x86)\Internet Explorer\iexplore.exe"
Hope this helps.
I'm guessing through the Environmental Variable(s) %SystemRoot% and %SystemRoo%\system32 – DukeSilversJazz – 2017-04-07T19:38:28.907
2I attempted to run "iexplorer.exe" from a PowerShell prompt, I was told it was an incorrect command, I attempted to run "notepad.exe" and the program executed. I then switched to the directory and ran "iexplorer.exe" and the program ran. So it actually is in your user's path variable. – Ramhound – 2017-04-07T19:40:42.720
2I also ran "iexplorer.exe" from the run command and was told the command was also invalid. So you have changed your path variable from the default (or my user path variable is different) in either case the path IS in the variable otherwise you would get the error. I then provide a path to the executable, and as expected, the program started. – Ramhound – 2017-04-07T19:44:29.913
1Isn't it
iexplore.exe
? That would be why it's returning as an invalid command. – Darren – 2017-04-07T21:16:49.763%SystemRoot% refers to C:\Windows, right? I checked there, and C:\Windows\System32, and didn't see iexplore anywhere. – Kyle Delaney – 2017-04-07T21:30:26.267
%PATH%
-- asdfasdf – allquixotic – 2017-04-08T02:31:02.600