Earlz
Earlz

Reputation: 63895

How to run makecert.exe without a GUI?

I recently came across a problem generating self-signed certificates in an automated fashion. Anytime I run makecert.exe I get a pop-up window for a password for the certificate. However, these certificates will never be distributed, so I don't need a password or anything.

How can I get makecert.exe to work without requiring a GUI?

If it helps, my command line takes this kind of form:

makecert.exe mycert.cer -r -n "CN=random-hex-number" -$ individual -sv private.pkv -pe -cy end

Upvotes: 9

Views: 4715

Answers (2)

Earlz
Earlz

Reputation: 63895

I didn't solve the root problem, but found a way to work around it. It only prompts for a password when you don't provide a private key. By generating a private key beforehand and passing it as the PVK, it won't prompt for a password now.

Upvotes: 3

NoNo
NoNo

Reputation: 313

Put the certificate and the private keys in a folder. then use the pvk2pfx tool to combine them into one file. Then when your ready to install use @pushd "%~dp0" @start "" /b (command) "%~dp0"

The pushd keeps it the files directory, and start "" /b runs the program without bring up the interface.

Upvotes: -1

Related Questions