'v3.6*************************************************** ' File: InternetTest.VBS ' Autor: dieseyer@gmx.de ' dieseyer.de ' ' Skript ermittelt, ob das Internet erreichbar ist. Zum ' Testen wird (nur) eine URL benutzt. '******************************************************* Option Explicit Dim oIE Dim Test, i Set oIE = CreateObject ("InternetExplorer.Application") With oIE ' .navigate "http://support.microsoft.com/newsgroups/default.aspx?ICP=GSS3&NewsGroup=microsoft.public.de.german.scripting.wsh&SLCID=DE&scrollnews=m1s9s12" .navigate "http://google.de" ' .visible = true .visible = False do until .readystate=4 wscript.sleep 100 if i > 20 then Exit Do ' entspr. 2sec warten i = i + 1 loop Test = .readystate ' If not Test = 4 Then MsgBox "Internet war nicht (schnell genug) erreichbar.", , WScript.Scriptname & " " & Test ' If Test = 4 Then MsgBox "Internet läuft.", , WScript.Scriptname & " " & Test .quit 'IE wird geschlossen End with Set oIE = nothing If not Test = 4 Then MsgBox "Internet war nicht (schnell genug) erreichbar.", , WScript.Scriptname & " " & Test If Test = 4 Then MsgBox "Internet läuft.", , WScript.Scriptname & " " & Test