If I know the process identifier, is there some mechanism in .net (or pinvoke as last resort) to capture/redirect the standard output of a process that I did not launch?
You could AttachConsole your process to the console of the other process, and then use the usual console I/O functions to read and write from it.
Remember to use FreeConsole to detach from the process' current console first.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With