title: Running an application using cmd with command line in C#
body: <p>I am working on a project that needs the cmd will run the application.</p>
  
  <p>with an automatic filling of the textbox of application.</p>
  
  <p>Currently, I have seen this code, but this does not work.</p>
  
  <p>It throws this exception - <code>StandardIn has not been redirected</code></p>
  
  <pre><code>Process process = new Process();
  ProcessStartInfo startInfo = new ProcessStartInfo();
  startInfo.FileName = @"C:\Windows\System32\cmd.exe";                  
  process.StartInfo = startInfo;
  process.StandardInput.WriteLine(@"C:\Program Files\WinMerge\WinMergeU.exe" + txtJOB.Text + txtKJOB.Text + "- minimize - noninteractive - noprefs - cfg Settings / DirViewExpandSubdirs = 1 - cfg ReportFiles / ReportType = 2 - cfg ReportFiles / IncludeFileCmpReport = 1 - r - u -or" + txtResultPath.Text);
  process.Start();
  </code></pre>
  
  <p>If i use cmd and run this line </p>
  
  <p><code>"C:\Program Files\WinMerge\WinMergeU.exe" + txtJOB.Text + txtKJOB.Text + "- minimize - noninteractive - noprefs - cfg Settings / DirViewExpandSubdirs = 1 - cfg ReportFiles / ReportType = 2 - cfg ReportFiles / IncludeFileCmpReport = 1 - r - u -or" + txtResultPath.Text</code></p>
  
  <p>this does work. but how will i Implement this command line in c#?</p>
  
  <p>can someone help me with this?</p>
  
  <p>Thanks in Advance.</p>