Using SignTool to code-sign a program file in a batch file


If you want to code-sign a EXE or DLL in a batch file you can copy and paste the command below to a batch file.
Update the path to your PFX certificate file and enter your password.
The call the batch file passing the path and name of the file to sign as the first parameter to the batch file.

signtool sign /as /fd sha256 /f "C:\Projects\Installers\Code-Signing Certificate\YouCertificate.pfx" /p password /tr /td sha256 %1


If you want to code-sign your EXE with SetupBuilder

Then fill in the fields:


Roberto Renz showed me a window were he also filled the Credentials and Private key, but this seems to work