Search code examples
internet-explorerpowershell32bit-64bitcomobject

Forcing 32bit internet explorer ComObject


I'm working on a script that is supposed to install some software from a link within internet explorer and unfortunately the site requires 32bit internet explorer to work. Is there a way to force a 32bit internet explorer window to open on 64bit machines? The script works fine when running from a 32bit machine.

$ie = New-Object -ComObject InternetExplorer.Application
$ie.Navigate2($url)
$ie.Visible = $true

Solution

  • $url = "http://www.google.com"
    $shell = New-Object -ComObject WScript.Shell
    $shell.Exec("C:\Program Files (x86)\Internet Explorer\iexplore.exe $url") | Out-Null