A BAT file I created on my XP Pro SP3 system works perfectly every time.
Installed on another XP [also Pro SP3] system it fails ("hangs up") every time.
The problem turns out to be in a multistep pipe. To isolate it I kept simplifying until I arrived at this minimal [and artificial] test case
echo. | date | find "/" | find "/" | find "/"
Note: the first two steps are not shortened to date /t
because some of the user's systems are pre-XP [and thus lack Command Extensions]. Also: careful testing shows that date
is executing the MS-DOS internal DATE
command and find
is executing the vanilla "FIND.EXE, Aug 4 2004, 9216" found in
"C:\WINDOWS\system32\" [and identical to the safety copy in "C:\i386\"].
On the failing system, every command with 4 or more |s hangs in the fifth step, even when - as here - the programs are simple and the amount of text they are handling is minuscule.
I did some further testing on the user's system yesterday and discovered a subtlety of which I was unaware. I entered the simplified command [above] at the command prompt. It failed ["hung"] as expected. However, when I rebooted and tried again before doing anything else [a case which would never occur in the user's normal operation], I got a shock: it worked [i.e., the output of the MS-DOS DATE command appeared as expected]. It worked again. Then on the third try the failure mode re-appeared, and remained consistent thereafter.
I confirmed that files=40
is in effect on both systems, and gave up. I'm still curious but I can't spend a lot of time on a small project for a pro bono client analyzing a problem for which I have easy work-arounds.
Thank you everyone here for your quick and useful responses.
On the original system, commands with 4 or more |s work properly regardless of which programs are invoked and how much text [within reason] they are handling.
Once the limitation is recognized there are many trivial workarounds, so my question is solely one of curiosity: can anyone suggest where the limit comes from and whether there is a setting [in XP] that will raise/eliminate it?
Note: Neither HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun nor HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun exists on either system.
Also: I apologize for answering comments by repeatedly editing my original post but no matter which browser I use to log in, the "add comments" popup [or whatever it is supposed to be] never appears. Perhaps my understanding that adding a comment to my own post doesn't require reputation points is mistaken. However, now I see that "show # more comments" isn't working either.
Finally: The problem I am having using this site [the primary symptom of which is the javascript console message "Uncaught ReferenceError: StackExchange is not defined "] is the same one discussed here https://meta.stackexchange.com/questions/117730/stack-overflow-onclick-actions-broken about a year ago.