Is there a way to suppress the popup window, when the
line is executed. I can suppress them if I run a script using cscript but I would prefer the cleaner look, no windows, of wscript.
Thanks for any help that may be provided
Dan
Code:
Set oExec = Ws.EXEC("ping -n 2 -w 500 " & hostname)
Thanks for any help that may be provided
Dan
Code:
Function Reachable(Hostname)
Dim WshShell, oExec
reachable = false
Set oExec = Ws.EXEC("ping -n 2 -w 500 " & hostname)
Do While oExec.Status = 0
WScript.Sleep 100
Loop
Do While oExec.StdOut.AtEndOfStream <> True
retstring = oExec.StdOut.ReadLine
if instr(retString, "Reply")>0 then
reachable = true
exit do
end if
Loop
end function