Running a ping is an EXCELLENT idea. I would suggest you make the ping part of your main script, instead of a seperate script. This is what I (we) do:

Code:

shell("%comspec% /c ping -n 2 $hostname | findstr /i ttl= >nul 2>nul")

if @ERROR = 0

; then do your stuff

else

; the machine is not pingable

endif



-Shawn