Hi all,
I am working on web app that pings remote servers to see if they are alive (has to be client-side script as app is being used as desktop "widgit" to monitor remote servers). I got the script to work but everytime it pings the distant end an annoying dos window pops up for a second. Is there anyway to hide the window when it runs the command? See source code below:
----
Dim results
On Error Resume Next
Set shell = CreateObject("WScript.Shell")
Set exec = shell.Exec("ping -n 1 -w 100 " & Target)
results = LCase(exec.StdOut.ReadAll)
Ping = (InStr(results, "reply from") > 0)
End Function
If Ping("192.168.2.1") Then
'script to visually show ping status (not relevant)
End If
----
I don't have too much familiarity with VBscript (prefer javascript), but this is the only way I know how to ping via client-side scripting. Any help? Thanks
I am working on web app that pings remote servers to see if they are alive (has to be client-side script as app is being used as desktop "widgit" to monitor remote servers). I got the script to work but everytime it pings the distant end an annoying dos window pops up for a second. Is there anyway to hide the window when it runs the command? See source code below:
----
Dim results
On Error Resume Next
Set shell = CreateObject("WScript.Shell")
Set exec = shell.Exec("ping -n 1 -w 100 " & Target)
results = LCase(exec.StdOut.ReadAll)
Ping = (InStr(results, "reply from") > 0)
End Function
If Ping("192.168.2.1") Then
'script to visually show ping status (not relevant)
End If
----
I don't have too much familiarity with VBscript (prefer javascript), but this is the only way I know how to ping via client-side scripting. Any help? Thanks