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.
iexplore.exe
? That would be why it's returning as an invalid command.