Re: Simple Ping Script
- From: "Pegasus \(MVP\)" <I.can@xxxxxxxxxx>
- Date: Mon, 17 Nov 2008 09:51:13 +0100
"K" <no@xxxxxxxx> wrote in message
news:ON0OqAJSJHA.4212@xxxxxxxxxxxxxxxxxxxxxxx
What are the errorlevels for the ping command?
I am trying to create a script that will ping a remote router, and in the
event it is non-responsive, will cause the machine the script is running
on to reboot without warnings or prompts.
Any help much appreciated.
Ping does not have any specific error levels. You need to check its output
in order to work out if the remote computer is responding, e.g. like so:
ping SomePC | find /i "bytes=" > nul && echo SomePC is responding.
or maybe
ping SomePC | find /i "bytes=" > nul || echo SomePC is not responding.
.
- Follow-Ups:
- Re: Simple Ping Script
- From: K
- Re: Simple Ping Script
- References:
- Simple Ping Script
- From: K
- Simple Ping Script
- Prev by Date: Simple Ping Script
- Next by Date: Re: Simple Ping Script
- Previous by thread: Simple Ping Script
- Next by thread: Re: Simple Ping Script
- Index(es):
Relevant Pages
|