ajtsystems
IS-IT--Management
Hi,
I have a simple do while loop which calls a function to check ping status. Is there a way I can loop it say 5 times then quit? I need to wait for 1 minute then assume computer not coming back!
do while reachable(IPAddress) = false
wscript.sleep 10000
If Reachable(IPAddress) Then
wscript.echo "Ping back"
Else
WScript.Echo "Computer is Unreachable!"
End If
loop
I have been looking at the for i = 1 to 5 but tis isnt workign...
Thanks
I have a simple do while loop which calls a function to check ping status. Is there a way I can loop it say 5 times then quit? I need to wait for 1 minute then assume computer not coming back!
do while reachable(IPAddress) = false
wscript.sleep 10000
If Reachable(IPAddress) Then
wscript.echo "Ping back"
Else
WScript.Echo "Computer is Unreachable!"
End If
loop
I have been looking at the for i = 1 to 5 but tis isnt workign...
Thanks