Command line tool to automate Microsoft’s SignCode tool (prevents the password dialog popping up).

Download: (53 KB ยท Version History)
Operating System: Windows NT 4, 2000, XP, 2003 or newer
License: Freeware

Microsoft has a tool called SignCode to sign any file using a private/public key algorithm. This files can later be verified with Windows APIs. The Internet Explorer also makes use of this possibility when it wants to start ActiveX controls.

Most people use SignCode as a command line tool. This lets them create a batch (.bat) file to do the signing, and maybe include the batch as a post-build step in their development environment. The only problem is that SignCode doesn’t let you supply the certificate password as part of the command line, so it always hassles you with a little password dialog.

SignCode password dialog

To avoid the dialog popping up, I wrote a small command line tool, called signcode-pwd. You start this tool right before SignCode. As parameter you provide the password you want to be filled in the password dialog. signcode-pwd watches the windows processes running and if it finds the SignCode password dialog it automatically completes it. If there are a series of dialogs popping up it all completes them. If the signing process is finished, terminate signcode-pwd.

If you dont want to pass your password as parameter to signcode-pwd, you also can encrypt it and put it into a file. See following screenshot for all provided functions:

signcode-pwd help

Example of how you use signcode-pwd (this could be a post build step):

It’s best to write a batch file, which takes as parameter the file which has to be signed and does the whole signing process. An example batch file is included in the download. It looks like this:

Happy signing!

One thought on “signcode-pwd

  1. Pingback: Can't Code Sign a Particular .MSI | keyongtech

Comments are closed.