how to run an exe command in c++ and get back the results?
I am writting a Gui for a device, in order to run tests on this device I have to run an exe file from the command window :
something like the following: >>c:\upgrade.exe -i 10.10.1.69 -f c:\file.txt -a

as u can see the exe file has a few switches as well, and the ip address and the location of the file is controlled by the user.
I should also get back the result of running the above command and analyse it and show the result in my Gui.

They want a windows application Gui, so I am using windows forms applications. I don't know how to make my program execute the above command and return back the results. I have looked at ShellExecute() and Creatprosess() so far, but they can only start up an exe file, once the file is started I have no control over it.
Can you please help me on this.