Page 1 of 1

Command Line Build - Passing Authenticode Password

Posted: Thu Nov 17, 2005 6:30 pm
by MobileMark II
Is there a way to pass the digital certificate signing password to the command line build process so that I am not prompted if I kick-off an automated build?

Posted: Thu Nov 17, 2005 8:34 pm
by sinan
Not at this time - the password must be manually entered.

Posted: Fri Nov 10, 2006 8:34 am
by H4nd0
You can get around this by using AutoIt3 to automate the filling in of the password prompt.

http://www.autoitscript.com/autoit3/

From you batch file launch your project compile thus (obviously setup your environment variables correctly):

Code: Select all

AutoIt3 build.au3 ""%IW_HOME%\\miabuild" "%IW_PROJ_FILE%" /o="%IW_PROJ_OUT%" /b="%IW_PROJ_TYPE%" /r" "%IW_PASS%"

The AutoIt3 runs the script build.au3 (below). You pass the complete build command line + the cert password (as the second parameter).

The build.au3 script looks like this:

Code: Select all

Run($CmdLine[1])

WinWaitActive("Enter Private Key Password")
Send($CmdLine[2])
Send("{TAB}{ENTER}")

WinWaitActive("Enter Private Key Password")
Send($CmdLine[2])
Send("{TAB}{ENTER}")

For my build, the private key is requested twice.

Posted: Tue Nov 21, 2006 4:03 am
by neillans
There is also a Microsoft command line signing tool (aptly named signtool.exe!).

It does everything 100% at the command line; I run this immediatly after creating the installers in my automated build environment, as it gets around the annoying popup :)

Andy

Posted: Tue Nov 21, 2006 5:30 am
by H4nd0
Since the EXE contains an MSI - you need to sign the MSI before including it in the EXE.

InstallAware does that for you. If you use SignTool you just sign the final EXE.

Most MS OS don't care about this level of signing ... except Vista.

... or so I am led to believe by IA support!