Basically i want the user to press a button and then the console will write all the appropriate lines for the user.
Here's the code i've written:
private void button6_Click(object sender, EventArgs e)
{
Process Cmd = new Process();
Cmd.StartInfo.FileName = @"C:\windows\system32\cmd.exe";
Cmd.Start();
StreamWriter sw = new StreamWriter(@"C:\windows\system32\cmd.exe");
{
sw.WriteLine = ("hello");
}
}
I tried StreamWriter but doesn't seem to be co-operating.