.VBS Datei erstellt/ Server anpingen und eine .txt erstellen

  • VBScript

Es gibt 1 Antwort in diesem Thema. Der letzte Beitrag () ist von fbu.

    Hallo Chilli

    Pingen funktioniert so:

    Visual Basic-Quellcode

    1. Function PingMyServer (ByVal strIP)
    2. Dim objPing
    3. Set objPing = GetObject ("winmgmts:Win32_PingStatus.address='" & strIP & "'"
    4. If IsNull (objPing.StatusCode) Or objPing.StatusCode <> 0 Then
    5. PingMyServer = False
    6. Else
    7. PingMyServer = True
    8. End If
    9. Set objPing = Nothing
    10. End Function

    Gruss Bruno