title: Run multiple commands on command prompt
body: <p>I am using this code</p>
  
  <pre><code>Process cmd = new Process();
  cmd.StartInfo.FileName = "cmd.exe";
  cmd.StartInfo.RedirectStandardInput = true;
  cmd.StartInfo.RedirectStandardOutput = true;
  cmd.StartInfo.CreateNoWindow = true;
  cmd.StartInfo.UseShellExecute = false;
  cmd.Start();
  cmd.StandardInput.WriteLine("SQLCMD -E -S srvName -Q \"RESTORE DATABASE dbName FROM DISK=\'C:\\app\\dbName_300915_000.bak\'\"");            
  cmd.StandardInput.Flush();
  cmd.StandardInput.Close();
  cmd.WaitForExit();
  textBox2.Text = cmd.StandardOutput.ReadToEnd();
  </code></pre>
  
  <p>to restore a database. My issue here is that I need to run the </p>
  
  <pre><code>cmd.StandardInput.WriteLine("SQLCMD -E -S srvName -Q \"RESTORE DATABASE dbName FROM DISK=\'C:\\app\\dbName_300915_000.bak\'\""); 
  </code></pre>
  
  <p>multiple times for multiple databases. Do I need to create a different process each time? I could use the <code>cmd.StandardInput.Writeline</code> one after another but I want an update on my textbox after each restore is finished. </p>