Re: [MSH] Requires an executable on the RHS of a pipe?
- From: "James Truher [MSFT]" <jimtru@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 7 Mar 2006 10:52:18 -0800
please log a bug
--
James W. Truher [MSFT]
Monad Program Management
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
"Bill Stewart" <llib.trawets@xxxxxxxxxxxxxxxxxx> wrote in message
news:OGPmk%23gQGHA.3872@xxxxxxxxxxxxxxxxxxxxxxx
It appears that MSH requires an executable on the right-hand side of a
pipe. If I attempt to pipe to a WSH script without specifying the script
interpreter's file name (i.e., cscript), MSH returns error 193 ("%1 is not
a valid Win32 application").
The below example is executed on a machine where cscript is the default
WSH host (cscript //H:CScript).
MSH C:\> get-content Test.js
var tsinput = WScript.StdIn, tsoutput = WScript.StdOut;
while (! tsinput.AtEndOfStream)
tsoutput.WriteLine(tsinput.ReadLine());
MSH C:\> get-childitem | Test.js
Program 'Test.js' failed to execute: The specified executable is not a
valid Win32 application.
At line:1 char:23
+ get-childitem | Test.js <<<< .
At line:1 char:1
+ g <<<< et-childitem | Test.js
MSH C:\>
Now, we already know that cmd.exe's input redirection is broken (see
http://groups.google.com/group/microsoft.public.scripting.wsh/browse_frm/thread/fba088728d73eb02),
but it would be nice if this was "fixed" in MSH.
--
Bill Stewart
.
- Follow-Ups:
- Re: [MSH] Requires an executable on the RHS of a pipe?
- From: Bill Stewart
- Re: [MSH] Requires an executable on the RHS of a pipe?
- References:
- [MSH] Requires an executable on the RHS of a pipe?
- From: Bill Stewart
- [MSH] Requires an executable on the RHS of a pipe?
- Prev by Date: Re: Vbs-logonscript takes time to execute.
- Next by Date: Re: Where is .Net code for this script?
- Previous by thread: Re: [MSH] Requires an executable on the RHS of a pipe?
- Next by thread: Re: [MSH] Requires an executable on the RHS of a pipe?
- Index(es):
Relevant Pages
|