Re: [MSH] Requires an executable on the RHS of a pipe?



Unfortunately, console redirection is a tricky thing. I can't explain why it doesn't work in cmd.exe (as we don't work on the team,) but I can tell you that it works in Monad :)

[C:\winnt\system32]
MSH:27 > dir | select -first 10 | c:\temp\test.js


Directory: Microsoft.Msh.Core\FileSystem::C:\winnt\system32


Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 4/5/2005 12:19 PM 2958 $winnt$.inf
-a--- 3/25/2003 4:00 AM 2151 12520437.cpx
-a--- 3/25/2003 4:00 AM 2233 12520850.cpx
-a--- 3/24/2005 4:55 PM 99840 6to4svc.dll
-a--- 3/25/2003 4:00 AM 1460 a15.tbl
-a--- 3/25/2003 4:00 AM 44370 a234.tbl
-a--- 9/19/2001 1:32 PM 720896 a3d.dll
-a--- 3/24/2005 4:55 PM 35328 aaaamon.dll
-a--- 3/24/2005 4:55 PM 69120 access.cpl
-a--- 3/25/2003 4:00 AM 64512 acctres.dll


--
Lee Holmes [MSFT]
Microsoft Command Shell Development
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.


-----Original Message-----
From: Bill Stewart
Posted At: Thursday, March 23, 2006 11:01 AM
Posted To: microsoft.public.windows.server.scripting
Conversation: [MSH] Requires an executable on the RHS of a pipe?
Subject: Re: [MSH] Requires an executable on the RHS of a pipe?


lee.holmes@xxxxxxxxxxxxxxxxxxxx wrote:

Actually, this already works in cmd.exe, as long as the program
supports it.

Hi Lee,

I forgot to mention that there's a longer discussion about this problem
in the following thread:

http://groups.google.com/group/microsoft.public.scripting.wsh/browse_frm/thread/fba088728d73eb02/

Your input is greatly appreciated.

Thanks

--
Bill Stewart
.



Relevant Pages

  • Re: [MSH] Requires an executable on the RHS of a pipe?
    ... this feature contributes significantly to the performance profile of tab completion. ... [MSH] Requires an executable on the RHS of a pipe? ...
    (microsoft.public.windows.server.scripting)
  • Re: [MSH] Requires an executable on the RHS of a pipe?
    ... Monad Program Management ... If I attempt to pipe to a WSH script without specifying the script ... MSH C:\> get-content Test.js ... Program 'Test.js' failed to execute: The specified executable is not a ...
    (microsoft.public.windows.server.scripting)