Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to do this in a batch file:

  1. Open cmd
  2. Run VS Command Prompt via cmd
  3. Execute this command "makecert -sv SignRoot.pvk -cy authority -r sha1 -a -n \"CN=Certificate\" -ss my -sr localmachine certificate.cer"

So far, I've done 1 and 2, my problem is getting into #3.

Here's what I have so far.

start  cmd.exe /k "%comspec% /c  "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86"
share|improve this question
up vote 1 down vote accepted

I don't have VS 10.0 installed to test this, but try putting these two line in a batch file:

call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
makecert -sv SignRoot.pvk -cy authority -r sha1 -a -n "CN=Certificate" -ss my -sr localmachine certificate.cer
share|improve this answer
it didnt work.. :( – for-each Feb 7 '13 at 4:47
I've figured it out. Simply put "call" before "C:\.... " – for-each Feb 8 '13 at 6:02
Good to hear -- I was thinking something like that might be necessary, but you beat me to it. Cheers. – martineau Feb 8 '13 at 13:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.