• BAT file to ping IP and record reply

    Home » Forums » AskWoody support » Windows » Windows – other » BAT file to ping IP and record reply

    Author
    Topic
    #393693

    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)

    Viewing 4 reply threads
    Author
    Replies
    • #715930

      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

    • #715931

      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

    • #716160
      @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

      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!

    • #716161
      @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

      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!

    • #717415

      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.

      • #730189

        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.

      • #730190

        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.

    Viewing 4 reply threads
    Reply To: BAT file to ping IP and record reply

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: