title: windows forms to run commands
body: <p>I am trying to launch a new cmd process, from that run a batch file to setup environments and from that run custom commands. Is this possible?</p>
  
  <p>So far I have:</p>
  
  <pre><code>Process cmd = new Process();
  cmd.StartInfo.UseShellExecute = false;
  cmd.StartInfo.Filename = &lt;setup.cmd path&gt;
  cmd.StartInfo.CreateNoWindow = false;
  cmd.StartInfo.RedirectStandardInput = true;
  cmd.Start()
  </code></pre>
  
  <p>this successfully set up the environment but the cmd window immediately closes and i can't submit more commands. </p>