title: How do I execute a cmd in C#, then in the same window execute another command that follows?
body: <p>Right what im trying to accomplish is a program that basically sets the active partition in 1 click, saving the effort time and skill of using cmd prompt etc.</p>
  
  <p>I have looked into the System.Management name space but couldn't work out how to use it :(</p>
  
  <p>So i have resorted to using CMD, i have got a module application written in C# and basically i want to run "DISKPART" which then starts the diskpart in the cmd window, then i want to ask it to "Select disk 0" followed by "select partition 1" finally followed by "active".</p>
  
  <p>Doing this in CMD yourself works fine but with an application its proved to be awkward :( What ive managed to get it to do is run DiskPart fine in one window with Process.Start, then get it to open a new window and run the next piece of code but because the new window hasnt ran the diskpart cmd it doesnt work >:( </p>
  
  <p>Any suggestions?</p>
  
  <p>Thanks!</p>
  
  <p>Ash</p>