Hi,
I am trying to read the console output of an "active" command prompt window. The following code that I tested with, causes the cmd window to close at the very same time when it is run. I want the command prompt window to stay open and be able to read the output of the cmd window. Please tell me how to achieve this.
$pid=Run("cmd.exe", "", @SW_SHOWMAXIMIZED, $STDIN_CHILD)
Sleep(2000)
$data = StdoutRead($pid)
ConsoleWrite("Debug:" & $data & @LF)
Thanks,
Anit