IE7 RC1 and vbscript (InternetExplorer.Application)

Hi,

Has anyone had problems with existing vbscripts that output to IE and the IE7 RC1 release? I have some vbscripts that use IE to display output and they work perfectly in IE6 but are broken with the RC1 release of IE7. Code like this below doesn't display anything in the browser window:

Set objExplorer = CreateObject("InternetExplorer.Application")
objExplorer.Navigate("about:blank")
objExplorer.AddressBar = 1
objExplorer.Toolbar = 1
objExplorer.StatusBar = 1
objExplorer.Width = 600
objExplorer.Height = 400
objExplorer.Left = 300
objExplorer.Top = 150

Do Until (objExplorer.readyState = 4)
wscript.sleep 100
Loop
objExplorer.Visible = 1

Set objDocument = objExplorer.Document
objDocument.Open

objDocument.Writeln "<html><head><title>Sample Title</title></head>"
objDocument.Writeln "<body><bgcolor='white'>"
objDocument.Writeln "<table width='100%'>"
objDocument.Writeln "<tr>"
objDocument.Writeln "<td width='50%'><b>Column 1 Heading</b></td>"
objDocument.Writeln "<td width='50%'><b>Column 2 Heading</b></td>"
objDocument.Writeln "<tr>"

objDocument.Writeln "<td width='50%'>Column 1 Output</td>"
objDocument.Writeln "<td width='50%'>Column 2 Output</td>"

objDocument.Writeln "</table>"
objDocument.Writeln "</body></html>"
objDocument.Write()
objDocument.Close

[1726 byte] By [MarkColeman] at [2007-12-25]
# 1

I too am having same issue, new IE window opens, but no content:

will supply code if someone is interested to troubleshoot...

XP SP2, IE7 RC1, all patches

DSwift at 2007-8-31 > top of Msdn Tech,Internet Explorer Development,Internet Explorer Web Development...
# 2

Hi,

I could never solve the problem so we ended up dumping IE7 RC1 and going back to IE6.

Mark

MarkColeman at 2007-8-31 > top of Msdn Tech,Internet Explorer Development,Internet Explorer Web Development...
# 3

Hi,

Unfortunately, I don't have a solution...just the same problem. A colleague thought he read that IE7 doesn't support WriteIn command, but I haven't been able to verify that.

Tatee at 2007-8-31 > top of Msdn Tech,Internet Explorer Development,Internet Explorer Web Development...
# 4
We are seeing the same problem: our VBScript breaks when we install IE7.

Here is the error I see:

Windows Script Host
Script: C:\Documents and Settings\pdurbin\Desktop\HMDC_VNC\Libs\Connect.vbs
Line: 84
Char: 3
Error: Permission denied: 'screen'
Code: 800A0046
Source: Microsoft VBScript runtime error

And here is how to replicate the problem:

1. Install Windows XP Service Pack 2
2. Install Internet Explorer 7
(IE7-WindowsXP-x86-enu.exe version 6.2.29.0)
3. Run Double_Click_ME.bat from
http://www.hmdc.harvard.edu/HMDC_VNC.EXE

I'm looking for a solution as well.

Phil

(I also posted this at http://groups.google.com/group/microsoft.public.internetexplorer.general/browse_frm/thread/e9687148addf8e5c )

pd.lists at 2007-8-31 > top of Msdn Tech,Internet Explorer Development,Internet Explorer Web Development...
# 5

I don't know the "whys", but here's a simple way to work around the problem. In your script just add the following at the beginning:

'The following registry entry will enable local files to be displayed using IE 7.0, but this setting will not take effect if the web browser is already open (there will be no error messages displayed if this is the case).
WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\blank\about", 2, "REG_DWORD"

And then at the end, reset the registry key using:

' Removes the registry key setting used with IE 7.0.
WshShell.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\blank\"

Lucidation at 2007-8-31 > top of Msdn Tech,Internet Explorer Development,Internet Explorer Web Development...
# 6

This solution didin't work for me. Mind you, I am not writing to a blank window, rather I am writing to a local HTML file that I load with IE then refresh regularly, This way I am displaying progress to the user but also have a log of the progress for later analysis.

In IE6 I can refresh and scroll the IE view without a problem. In IE7 I get unspecified errors.

If I rem out the refresh and just use a scroll like this: objie.document.parentwindow.scrollto 0,2000

I get the error: The object invoked has disconnected from its client.

Irritating. I don't want to have to do a major rewrite of this app....

Major at 2007-8-31 > top of Msdn Tech,Internet Explorer Development,Internet Explorer Web Development...