I want to run the CreateProcess method in a console session in which I can do some subsequent processing to capture response output coming from a remote computer that is generated after the process I have run using CreateProcess has completed.

The output that follows my CreateProcess command cannot be piped so somehow after my initial command has been completed I would like to capture the output that I see in the console window when I run the process via a batch file.

Are there some special parameter settings I should use for calling CreateProcess in this instance? What could I use to capture the response output? At the moment only ReadConsoleOutput looks useful to me.