title: how i can execute CMD command in c# console application?
body: <p>It's very simple to make a mysqldump in <code>cmd</code> on windows, simply:</p>
  
  <p><em>Open <code>cmd</code> and put type mysqldump uroot ppassword database > c:/data.sql</em></p>
  
  <p>This results in an SQL dump file for the desired database.</p>
  
  <p>I'm writing a console application so I may run this command:</p>
  
  <pre><code>-uroot -ppass databse  &gt; location\data.sql
  </code></pre>
  
  <p>I tried the following code to no avail:</p>
  
  <pre><code>System.Diagnostics.ProcessStartInfo procStartInfo =
      new System.Diagnostics.ProcessStartInfo("cmd", "/c " + cmd); 
  </code></pre>
  
  <p><em><strong>How might I start a <code>cmd</code> process and send my command successfully?</em></strong></p>