0

I have a console application which I run through a WinForms application, which waits for the application to finish. How can I retrieve the output of the console application in my GUI, and what is the best way to wait for the console application to finish?

Tetsujin no Oni
  • 7,300
  • 2
  • 29
  • 46
ZoRo
  • 401
  • 2
  • 5
  • 12

2 Answers2

1

It is possible with "Process" class. Please refer to the ProcessStartInfo.RedirectStandardOutput Property example available in the below link.

http://msdn.microsoft.com/en-us/library/system.diagnostics.processstartinfo.redirectstandardoutput.aspx

Hope this helps.

Karthik Mahalingam
  • 1,071
  • 8
  • 10
0

Look up Inter-Process Communication

Since you're using .Net. See WCF Named-Pipes for example.

kervin
  • 11,672
  • 5
  • 42
  • 59