VBS to open IExplorer in Incognito mode

2.1k views Asked by At

Is there any way to open IE in Incognito mode using VBS?

Like:

Set IE = CreateObject("InternetExplorer.Application") 

 IE.navigate "Google.dk" 
 IE.Visible = 1

but instead of opening a normal iexplorer, open a incognito version?

I need this because Theres an issue with a webform i use, and until its fixed, the easiest way around is using incognito.

1

There are 1 answers

0
Gematria On BEST ANSWER

So it seems its not possible to have vbs open IE in InPrivate.. However, it would seem i can use cmd to open iexplorer in inprivate, then tag it for the VBS script using something like:

For Each wnd In CreateObject("Shell.Application").Windows
  If InStr(1, wnd.FullName, "iexplore.exe", vbTextCompare) > 0 Then
    Set IE = wnd
    Exit For
  End If
Next