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; ie:
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, eg 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
如果您可以控制使用IE窗口加载的Web应用程序,则可以将其会话设置为“无cookie”(http://msdn.microsoft.com/zh-cn/library/aa479314.aspx),这样可以避免出现问题你有多个实例。
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 eg "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 eg"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.
链接地址: http://www.djcxy.com/p/49910.html上一篇: “操作无法完成”