InternetExplorer.Application with -nomerge switch?
I'm trying to create a InternetExplorer.Application object, but I want IE to start with the -nomerge switch. Is ther开发者_如何学运维e any way of doing this?
Similar question asked here a while ago & it doesn't seem possible with the usual InternetExplorer.Application object; the answer posted suggested either using WebBrowser or alternative ways of clearing session cookies
However there's also another option that would have a similar effect using the InPrivate mode - if you're using VB.NET
From visualbasic.about.com:
In VB.NET, you can add a reference to ShDocVw.dll (in Windows/System32) using the Browse > tab in Add Reference) and open an instance of IE 8 using the new "InPrivate" mode.
> Dim TheBrowser = New SHDocVw.InternetExplorerMedium
> TheBrowser.Visible = True
> TheBrowser.Navigate( _
> URL:="http://visualbasic.about.com")
精彩评论