Originally Posted By: Glenn Barnas
 Code:
Function Alive($Host)
 Shell '%COMSPEC% /c Ping ' + $Host + '>NUL:'
 If @ERROR
  $Alive = 0 ; return 0, not alive
  Exit @ERROR
 Else
  $Alive = 1 ; return 1, is alive
  Exit @ERROR ; 
 EndIf
EndFunction



PS - Note that this example sorta works, and is OK for explaining the logic, but is not the most reliable method of ping checks!


Whoa Glenn, you should mention this more strongly! It is not just not the most reliable method, it's simply NO Method !
It will happily report 'Alive' state no matter what is fact on the other end of the line until you delete ping.exe or something
_________________________