Help : Redirecting Console results on forms


Ad

Advertisements

N

noor

Hi,
I'm creating an interface for a network device basically its a GUI for
cofiguring the devices. Configration Commands are working fine on command
prompt I just want to make there GUI so my client should not go to that
BLACK screen to configure those devices.
I m useing this code
//Declare and instantiate a new process component.

System.Diagnostics.Process process1;

process1= new System.Diagnostics.Process();

//Do not receive an event when the process exits.

process1.EnableRaisingEvents = false;

//The "/C" Tells Windows to Run The Command then Terminate

string strCmdLine;

strCmdLine = "/C regenresx "+textBox1.Text + " " +textBox2.Text;

System.Diagnostics.Process.Start("CMD.exe",strCmdLine);

process1.Close();

This code is running fine but it shows result in that Black screen I WANT
TO REDIRECT THE RESULT OF COMMAND IN MY GUI. kindly help me out.

thanks in advance.

regards

Noorali
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top