open command prompt within form?
Is it possible to have a command window open within a form? I have some shell scripts that I need to execute from my C# app and I don't want an extra window to pop up.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
JohnPosted Jan 18, 2008, 4:37 AM
JohnPosted Jan 18, 2008, 3:35 AM
I've used Process.Start() to execute the program, but it opens it in a new window. What I need is a control or something within my existing form that will display the program.
Example: when I execute my application, left side of form have a textbox to contain a list of computers and a textbox to contain a filename. have a button to execute filecopy. on right side of form display command prompt which will display all output that a normal command prompt window would.
by the same thinking, could maybe have an instance of iexplore.exe display within my form.
Scott LyslePosted Jan 18, 2008, 3:14 AM
Have you tried to launch the script by just using System.Diagnostics.Process.Start?
System.Diagnostics.
Process.Start("c:\\temp\\GeoBase_Data_Models_NRNC1_v01.pdf");