Hi Mike,
This thing wont work as the EXE i am using does not provide any output. It in turn creates a .bat file with necessary contents from the command line options provided to the EXE and then calls it. After that the batch file is deleted. So it is only through the EXE i can have the batch being run.
Hence you see a new CMD window opens by this EXE which runs the batch file content. Now I want to capture the contents of the batch run from that particular bat file.
In the above example provided by you, netstat.exe itself will provide an output. It does not call any other batch file hence the output is captured but it is not the case with me.
Let me know if you find out the solution to my problem
Last edited by shouvik.d; Dec 31st, 2008 at 4:13 am. Reason: Providing more clarity to the problem
Regards
Shouvik