-1

From a windows 7 machine, I ping a non existing ip address.

C:>ping 192.168.1.222

Pinging 192.168.1.222 with 32 bytes of data:

Reply from 192.168.1.222: Destination host unreachable.

Reply from 192.168.1.222: Destination host unreachable.

Reply from 192.168.1.222: Destination host unreachable.

Ping statistics for 192.168.1.222: Packets: Sent = 3, Received = 3, Lost = 0 (0% loss)

Even though there is no reply, the errorlevel is set to 0.

**what I am trying to do, is figure out if a remote machine is replying to ping. One of my test is to turn off the machine and ping it. For some reason, ping sets errorlevel to 0 **

Doron
  • 21
  • 4
  • 10

1 Answers1

1

You can pipe the output of the ping command through find to see if the ping had a reply: http://www.tek-tips.com/viewthread.cfm?qid=304609

Andrew Morton
  • 201
  • 1
  • 5