Invoking Console Application at runtime
-
Hey guys, I would like to know if there is any way by which I can capture the output of an console application before it exits. I have an console application which runs continuously and never exits unless killed. While running it generates output on the action done on a perticular file. That is it keeps a watch on a perticular file. I want to capture those console outputs real time. But the problem is StandardOutput property of the System.Diagnostics.Process class doesn't work till the called process exits from the Main. If anybody has any solution then please let me know. thanks in advance... Aryadip Guha Niyogi Cheers !! and have a Funky day !!
-
Hey guys, I would like to know if there is any way by which I can capture the output of an console application before it exits. I have an console application which runs continuously and never exits unless killed. While running it generates output on the action done on a perticular file. That is it keeps a watch on a perticular file. I want to capture those console outputs real time. But the problem is StandardOutput property of the System.Diagnostics.Process class doesn't work till the called process exits from the Main. If anybody has any solution then please let me know. thanks in advance... Aryadip Guha Niyogi Cheers !! and have a Funky day !!
You can always use good old redirection (i dunno if process supports this however) eg my.exe >> myexe.log, and then use a 'tail' util to monitor the output.
-
You can always use good old redirection (i dunno if process supports this however) eg my.exe >> myexe.log, and then use a 'tail' util to monitor the output.