Network Connectivity Script Help.

Home Forums Scripting General Scripting Network Connectivity Script Help.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    U-Phorik
    Member
    #126159

    Help me out here, I’m having a ‘Case of the Mondays’ and I’ve got a lot on my plate… Can someone help me out with this…

    Basically, I want my batch script to do this:

    1. Start DHCP Client
    2. Ping Our Default Gateway
    IF PING FAILS KILL DHCP, and Send a Message.
    IF PING SUCCESSFUL SEND MESSAGE

    Below is my script: (Adjust and add code as needed)


    @echo
    off
    NET START “DHCP Client”
    ping xx.xx.xx.x
    IF errorlevel 1 NET STOP “DHCP Client”
    PAUSE



    Thanks

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.