GetUrlDocItem "http://home.iSTAR.ca/~neutron/detectjvm/", _ "forms(0).version.value", "forms(0).vendor.value" Sub GetUrlDocItem(url,item1, item2) Const READYSTATE_COMPLETE = 4 Const SleepTime = 300 ' ms Const TimeOut = 10000 ' ms timeout (10 sec) for loading url Dim oIE, oDoc, count, getItem Set oIE = WScript.CreateObject("InternetExplorer.Application") oIE.width = 500 ' testing oIE.height = 500 ' testing oIE.navigate(url) ' Create an empty HTML document. oIE.visible = 0 ' Keep IE invisible. count=0 ' initialize detect timeout Do While(NOT (oIE.readyState = READYSTATE_COMPLETE)) ' Wait for Window WScript.Sleep SleepTime count = count+1 If count > TimeOut/SleepTime Then oIE.Stop oIE.Quit WScript.Echo "Failed to load: " & url WScript.Quit End If Loop Set oDoc = oIE.Document On Error Resume Next WScript.Echo "JVM Version: " & Eval("oDoc." & item1) WScript.Echo "JVM Vendor: " & Eval("oDoc." & item2) If Err <> 0 Then WScript.Echo "Problem getting properties" End If On Error GoTo 0 Set oDoc = Nothing oIE.Quit End Sub