I am trying to pass a string of arguments that will open a command line, and pass the specified arguments upon a button click. I am trying to define one value as the contents of a text box (constant ping to the IP address listed in the box). It will open the command line but will not pass any arguments, can anyone assist?
private void Pingbutt_Click(object sender, EventArgs e)
{
System.Diagnostics.ProcessStartInfo proc = new System.Diagnostics.ProcessStartInfo();
proc.FileName = @"C:\windows\system32\cmd.exe";
String s = Cmiptxt.Text;
proc.Arguments = (@"c/ ping" + s + "-t");
System.Diagnostics.Process.Start(proc);
}