Тема: VBS: Тестирование интернет соединения
Сделал вот так не работает выдает ошибку че ему не хватает?
Dim fso, tf, time
Set fso = CreateObject("Scripting.FileSystemObject")
while 1=1
Const ForAppending = 8
Set tf = fso.OpenTextFile("Тест интернет.txt", ForAppending, True)
time = Now()
tf.Write(time)
Set oShell = WScript.CreateObject("WScript.Shell")
strHost = "192.168.0.150"
strPingCommand = "ping -n 1 -w 300 " & strHost
ReturnCode = oShell.Run(strPingCommand, 0 , True)
If ReturnCode = 0 Then
tf.WriteLine ""
tf.WriteLine "Есть подключение."
Else
tf.WriteLine ""
tf.WriteLine "Нет подключения."
End If
WScript.Sleep 10000
wend
