Error in Batch File "The process tried to write to a nonexistent pipe."

Every time I run the simple batch file below I get the following error :

The process tried to write to a nonexistent pipe. can I solve this ?

PING -n 1 | FIND "TTL=" >NUL
PING -w 3000 | FIND "TTL=" >NUL
IF ERRORLEVEL 0 ECHO No Error pinging server
LVL 19
http:// thevpn.guruAsked:
Who is Participating?
SteveGTRConnect With a Mentor Commented:
I ran it on my home XP/Pro machine and it worked fine. The only thing I could see that might help is this reference:
scrathcyboyConnect With a Mentor Commented:
eliminate the FIND TTL= statement and it will work in a batch file.  The batch expects the pipe to follow by output immediately.  YOu will find this works at the command line, it is simply an artifact of the DOS batch.
ShankadudeConnect With a Mentor Commented:
You can remove the FIND part, however PING doesn't always return an error level 0 when the server was pingable, for example if your router replies that it can't ping the destination network.

If you remove the >NUL you keep the function of the batchfile as it was supposed to be, it only output text if it finds the TTL in the ping output, but at least you're sure that it works.
Your history of grading has eliminated me from helping you in the future.

I suggest you read the EE Guidelines...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.