title: Compile an .asm file through c# using cmd
body: <p>I want to compile an .asm file placed in bin folder in the masm through c#.I have tried multiple methods like process.start but nothing helps.It opens the cmd but the command "ml" never executes.It either open the pwb.exe(MASM) or the 'file.asm' in notepad.I give these arguments to CMD <strong>"path\ml file.asm"</strong> which works fine manually.<strong>ml is a command used to compile .asm files</strong>. One of the method I used is following</p>
  
  <pre><code>System.Diagnostics.Process process = new System.Diagnostics.Process();
  System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
  startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
  startInfo.FileName = @"C:\WINDOWS\system32\cmd.exe";
  startInfo.Arguments = "C:\Users\Hassan\Documents\Visual Studio 2010\Projects\FYP\FYP\MASM611\BIN\ml file.asm";
  
  process.StartInfo = startInfo;
  process.Start();
  </code></pre>