开发者

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 s开发者_开发知识库ingle 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?


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


If you have control over the web application you are loading with your IE window you can set it's session to "cookieless" (http://msdn.microsoft.com/en-us/library/aa479314.aspx) which will avoid the issues you're having with multiple instances.


The solution we ended up going with, although it's more a work around than anything else - was assigning a new url to the popped up window.

Previously, it worked as follows:

Call centre agents would be using our internal app for other duties e.g. "http://internalsite/somepage.faces" on a day to day basis. When they got a phone call, a third party app would fire up "http://internalsite/customerdetails.faces". This caused the issues mentioned above.

The solution we went with:

We assigned "http://internalsite/customerdetails.faces" it's own url e.g."http://customerdetailminisite/customer.faces".

This way the call center agent could keep their main window open for other stuff and still be able to handle calls when they came in.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜