Hello All,
Im trying to write a little gui for a command line application i have to run everyday. The command line app is run as follows:
stcmpgo -s http://localhost -u username -p password -a -n -i filename.xml
There are multiple flags that can be set which I will use check boxes to add them to the command line as not all are used each time.
I have a button set up to run the command and would like to have the output goto a text box with in the application. The application doesn't seem to run. Currently im just getting started so im trying to display a directory listing in the textbox just so I can get an understand on how to get the output to display. Then I can build from there.
Any advice?
I tried using code as follows:
Process p = new Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.FileName = "dir";
p.Start();
string Output = p.StandardOutput.ReadToEnd();
p.WaitForExit();
outputTextbox.Text = Output;