run-hidden icon indicating copy to clipboard operation
run-hidden copied to clipboard

Redirect stdin, stdout and stderr

Open thefasquelle opened this issue 1 year ago • 1 comments

Would it be possible to redirect standard streams so that an app can run an other in a hidden window, but still get its output ?

I tried this :

    si.hStdError = stderr;
    si.hStdInput = stdin;
    si.hStdOutput = stdout;

just before CreateProcess, but it didn't work.

just reading stdout and stderr when process exit and write them back to own stdout and stderr would be fine with me. But if it is possible to set up a plain redirect for all standard streams it would be ideal.

thefasquelle avatar Mar 17 '25 16:03 thefasquelle

I've never wrote much C/C++ code, and also don't have much experience with console IO. It probably can be improved, but I probably won't do it.

stax76 avatar May 04 '25 01:05 stax76