Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    May 2003
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    BAT file to ping IP and record reply

    Hi,

    Can any1 help me out, i hav an IP Address that i want to check is connected to the network, i can do this by from dos by pinging the IP address; ping 192.168.100.13; and if i get a reply it's connected....

    but i want to check that it's on all the time; ping 192.168.100.13 -t; does this but is their a way i can monitor the results.... maybe a vbs or bat file that would popup a msg if the ping timesout....?????

    + i'm welcome to any other suggestions....

    Cheers
    Phil

    p.s.
    the IP address is for a proximity box (not a PC)

  2. #2
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: BAT file to ping IP and record reply

    Funnily enough, a Google for "ping monitor" brings up a program called Ping Monitor!
    Or the cheaper Speed Ping Monitor
    Or there is some free VB code at freevbcode.com

  3. #3
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: BAT file to ping IP and record reply

    <pre>@echo off
    :: BATch file to PING an address twice, waiting five seconds before re-pinging
    :: In its current form this BATch file will never stop;
    :: short of a restart or Task Manager End Process

    :loop
    :: ping twice, and check you get at least one "Reply from" message
    :: (change if you want to test for "TTL=" or whatever)
    ping -n 2 192.168.100.13 | find "Reply from" > nul
    if errorlevel 1 net send USERID Ping of 192.168.100.13 failed
    :: wait for 5 seconds, 6 pings, before trying 192.168.100.13 again
    ping -n 6 127.0.0.1 > nul
    goto :loop</pre>

    Change the time values round, the display method to ECHO, etc etc

    You can't use your method of having PING ping continuously, because you need a way to check the resulting message(s), and you can't do this from within PING.EXE!
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  4. #4
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Long Beach, California, USA
    Posts
    1,912
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: BAT file to ping IP and record reply

    While using ping like that is usable to accomplish your goal, you might want to consider something like this:
    'Net Monitor v3.5
    Monitor your Internet connection! This Power Tool perodically tests the web servers and e-mail servers of your choice, and attempts to download a specific page. It can also test connections to any computer on the local network, or on the Internet! It reports any errors that occur, so you can take corrective action.

    New feature! The 'Net Monitor can now send e-mail notifications of failures at monitored web sites and e-mail servers.

    --- Price = free.

  5. #5
    Lounger
    Join Date
    Aug 2002
    Location
    Boise, Idaho, USA
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: BAT file to ping IP and record reply

    R2,

    I considered setting up Karen's NetMonitor a couple of months back, when we were having ISP troubles at the office, but ended up with a conundrum: how do I get email notification when the ISP is down? As far as I could tell, her Mailer II program wouldn't work with Windows Messaging. Admittedly, I haven't gotten around to emailing her about this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •