Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Start Internet Explorer 8 in a separate process using vbscript

Due to the recently added "feature" in IE8 where new windows are automatically associated with a single session, some of our code is behaving erratically.

This is because a separate app would launch a new IE window when it was activated, and once the user was finished, close the window. This worked fine in IE7 because the session information in the windows stayed separate. However in IE8, since the session is shared among IE windows, we find that the "pop up" app would corrupt the session on the first app.

I have read about the nomerge switch, so that is a workaround, but I was wondering if there was a way of working the solution into the "CreateObject" of vbscript; i.e:

Dim ieWin As Object
Set ieWin = CreateObject("InternetExplorer.Application")

Is there a way of sending parameters when calling the CreateObject function?

like image 900
Robert Ngetich Avatar asked Jan 10 '11 14:01

Robert Ngetich


1 Answers

No, there's no way to use COM to create an IE instance that specifies this behavior (or any of the others, e.g. InPrivate, No Add-ons, etc). The only thing you can do is create an automation instance that defaults to MediumIL using the CLSID provided for that purpose. http://blogs.msdn.com/b/ieinternals/archive/2011/08/03/internet-explorer-automation-protected-mode-lcie-default-integrity-level-medium.aspx

like image 149
EricLaw Avatar answered Sep 23 '22 01:09

EricLaw