Hi,
I have a third-party (closed source) executable that I run with Task Scheduler via a batch script. I'd like to capture all the output of this executable for logging purposes. Inexplicably, if I use regular old stdout or stderr redirection in the batch file, some of the text that is displayed in the command window is captured in the log file and some is not.
So my question is the following: Is it possible to use the Windows API to directly read the text contents of a Command Prompt window? I figure if I can poll that window I might be able to capture the text. I messed around with AutoIt once and this seemed like the kind of thing it could do, but I'd prefer to work with VB.NET for this purpose.
Thanks.
I have a third-party (closed source) executable that I run with Task Scheduler via a batch script. I'd like to capture all the output of this executable for logging purposes. Inexplicably, if I use regular old stdout or stderr redirection in the batch file, some of the text that is displayed in the command window is captured in the log file and some is not.
So my question is the following: Is it possible to use the Windows API to directly read the text contents of a Command Prompt window? I figure if I can poll that window I might be able to capture the text. I messed around with AutoIt once and this seemed like the kind of thing it could do, but I'd prefer to work with VB.NET for this purpose.
Thanks.