• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 8762
  • Last Modified:

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.
..how can I solve this ?

@ECHO OFF
::pinger
PING www.google.com -n 1 | FIND "TTL=" >NUL
IF NOT ERRORLEVEL 1 GOTO Next
PING www.google.com -w 3000 | FIND "TTL=" >NUL
IF ERRORLEVEL 0 ECHO No Error pinging server
:Next
0
http:// thevpn.guru
Asked:
http:// thevpn.guru
  • 2
3 Solutions
 
SteveGTRCommented:
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:

http://support.microsoft.com/kb/135268
0
 
scrathcyboyCommented:
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.
0
 
ShankadudeCommented:
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.
0
 
SteveGTRCommented:
Your history of grading has eliminated me from helping you in the future.

I suggest you read the EE Guidelines...
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now