Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Ping  

 Content of Ping.vbs
MD5 Hash: D97FC435E0CB8D960D736CC50F7378C6
'#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#'
'/| |\\\\\\\\'
'//| |\\\\\\\'
'///| |\\\\\\'
'////| Version 1.0.0 |\\\\\'
'/////| Author: Boris TOll |\\\\'
'//////| Last Update: 31.01.2008 |\\\'
'///////| |\\'
'////////| |\'
'#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#*~#'

Dim strComputer : strComputer = "myComputer"


If Ping(strComputer) then
MsgBox strComputer & " is reachable!",64
Else
MsgBox strComputer & " is not reachable!",16
End if



' --------------------------------
Private Function Ping(strComputer)

Dim oPing : Set oPing = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery("select * from Win32_PingStatus where address = '" & strComputer & "'")
Dim bReachable : bReachable = True

For Each oStatus in oPing
If IsNull(oStatus.StatusCode) or oStatus.StatusCode <> 0 Then
bReachable = False
End If
Next

Set oPing = Nothing
Ping = bReachable

End Function

   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a