views:

449

answers:

1

I'm having a very strange problem where I run a managed .net console app on a remote server using psexec. I get this error "The process tried to write to a nonexistent pipe".

Now I wrote an unmanaged C++ program to output to std::cout, and it works just fine.

Interestingly, if I run cmd.exe remotely, and use the /u (unicode) option, I don't get the error, but I get garbage text streamed back to the console.

Can anyone explain what might be going on here?

Cheers, Mark

A: 

To work around this problem, I remotely run a .cmd script, which runs the .net application, redirecting (">") its output to a file. I then "type" the file in the script, and I now get output back.

I still don't understand why the .net application's console output is getting lost, but this work-around does the job.

Mark

Mark
can you give an example of how you got this working?
Derek Ekins
I didn't actually get it working. I just had the cmd script I was trying to run, redirect its output to a file. Then "type" the file to stdout. Strange, but it worked.
Mark