Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.