Two ways.
1 - The way you are doing it (but hide the window). So each time you want to run a cmd populate a string with the command and run your
System.Diagnostics.Process.Start("CMD.exe",cmdText);
Example [here][1].
2 - If you want an actual interactive session with the terminal (but with it hidden) you'll want to do something like [this][2].
[1]: http://stackoverflow.com/questions/1469764/run-command-prompt-commands
[2]: http://stackoverflow.com/questions/3308500/run-interactive-command-line-exe-using-c-sharp
↧