I am doing a simple program with Visual Studio to execute some commands in CMD that I want, currently the program has only a simple screen and a button to open the cmd, but I would like to specify the command that the prompt should run.
Eg: Ipconfig, flushdns, etc.
Currently my code is like this, using System.Diagnostics
namespace Comands
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("CMD.exe");
}
}
}