Capture output of command ? #8
-
Hello, Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi. I just added support for specifying standard input/output handles when using process creation wrappers in 9a8e2b0. This includes wrappers for Now it's possible to use anonymous pipes to redirect console I/O, similar to what this Microsoft sample does. Here is an example of how to use this functionality to capture output of running a cmd command: https://gist.github.com/diversenok/eb823ea9f81b0f16b9cf8fc97e68c88f |
Beta Was this translation helpful? Give feedback.
Hi. I just added support for specifying standard input/output handles when using process creation wrappers in 9a8e2b0. This includes wrappers for
CreateProcessAsUser
,CreateProcessWithTokenW
,CreateProcessWithLogonW
,NtCreateUserProcess
,RtlCreateUserProcess
,RtlCreateUserProcessEx
, andNtCreateProcessEx
. Keep in mind that the last three don't support inheriting the current console, so they will still spawn a new one (which you might want toSW_HIDE
), regardless of I/O redirection.Now it's possible to use anonymous pipes to redirect console I/O, similar to what this Microsoft sample does.
Here is an example of how to use this functionality to capture output of running a cmd command: http…