Destination host unreachable, but the errorlevel is 0 (from a win7)

Posted by Doron on Server Fault See other posts from Server Fault or by Doron
Published on 2012-03-23T08:56:25Z Indexed on 2012/03/23 11:31 UTC
Read the original article Hit count: 265

Filed under:
|

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 *

© Server Fault or respective owner

Related posts about windows-7

Related posts about ping