December 5, 2006

Web Automation in Vista

Filed under: Announcements,Automation,Scripting,Vista — Marcus Tettmar @ 1:51 pm

To run WebRecorder, or VBScript macros which automate Internet Explorer in Vista (IE7), you will first need to disable “Protected Mode”. Consider this simple VBScript code:

Dim IE
Set IE = CreateObject(“InternetExplorer.Application”)
IE.Visible=1
IE.Navigate “http://www.mjtnet.com”

In IE6 and in IE7 under XP this code would create a new IE instance and then navigate it to mjtnet.com. But Vista adds something to IE called “Protected Mode” and for some reason Protected Mode causes the Navigate method to open up a new IE window. This is most annoying because it means any subsequent code in a script like the one above would fail because IE object refers to the instance created with the CreateObject call, but the page is now in the second instance.

You can disable “Protected Mode” in IE under Tools/Internet Options/Security. This puts things back to normal and means code like the above will continue to work.

One known issue with WebRecorder’s IEAuto.DLL is that the WaitNewIE function hangs when using IE7. We’re working on this now. This function is only used when an action in IE causes a new window/tab to appear. Apart from that, once you have disabled “Protected Mode” WebRecorder/IEAuto works fine with IE7/Vista.

Update: Version 1.78 is now available, fixing the issue with WaitNewIE on IE7.