title: Batch file: Open cmd, run VS Command Prompt, execute Makecert
body: <p>I need to do this in a batch file:</p>
  
  <ol>
  <li>Open cmd</li>
  <li>Run VS Command Prompt via cmd</li>
  <li>Execute this command
  "makecert -sv SignRoot.pvk -cy authority -r sha1 -a -n \"CN=Certificate\" -ss my -sr localmachine certificate.cer"</li>
  </ol>
  
  <p>So far, I've done 1 and 2, my problem is getting into #3.</p>
  
  <p>Here's what I have so far.</p>
  
  <pre><code>start  cmd.exe /k "%comspec% /c  "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86"
  </code></pre>