How to capture "legacy" program output in MSH and redirect them to MshHostUserInterface
- From: "TonyDeSweet" <shenzhonghao@xxxxxxxxx>
- Date: 20 Mar 2006 07:36:15 -0800
I am writing a remote Msh host which will redirect all output to
network stream. go to http://mshforfun.blogspot.com/ for details.
I use following code to invoke pipline:
pipe = ServerRunspace.CreatePipeline();
pipe.Commands.AddScript(Input);
pipe.Commands.Add("out-default");
pipe.Commands[0].MergeMyResults(PipelineResultTypes.Error,PipelineResultTypes.Output);
pipe.Invoke();
It works fine for normal msh script. But "legacy" program still write
output directly to Console. For example:
if Input == "ping 127.0.0.1" the out put did not been directed to
MshHostUserInterface.
How to capture "legacy" program output in MSH and redirect them to my
own MshHostUserInterface.
Thanks
.
- Follow-Ups:
- Re: How to capture "legacy" program output in MSH and redirect them to MshHostUserInterface
- From: Bruce Payette [MSFT]
- Re: How to capture "legacy" program output in MSH and redirect them to MshHostUserInterface
- Prev by Date: Find Users in a Group
- Next by Date: How to override "Prompt" method in MshHostUserInterface?
- Previous by thread: Find Users in a Group
- Next by thread: Re: How to capture "legacy" program output in MSH and redirect them to MshHostUserInterface
- Index(es):