Command Line Build - Passing Authenticode Password

Got a problem you cannot solve? Try here.
MobileMark II
Posts: 19
Joined: Thu Nov 03, 2005 11:58 am
Contact:

Command Line Build - Passing Authenticode Password

Postby MobileMark II » Thu Nov 17, 2005 6:30 pm

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?

sinan
Site Admin
Posts: 1028
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Postby sinan » Thu Nov 17, 2005 8:34 pm

Not at this time - the password must be manually entered.

H4nd0
Posts: 92
Joined: Thu Nov 09, 2006 8:16 am
Location: Sydney, AU
Contact:

Postby H4nd0 » Fri Nov 10, 2006 8:34 am

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.

neillans
Posts: 536
Joined: Sat Nov 04, 2006 6:21 am
Location: Scottish Borders, UK
Contact:

Postby neillans » Tue Nov 21, 2006 4:03 am

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

H4nd0
Posts: 92
Joined: Thu Nov 09, 2006 8:16 am
Location: Sydney, AU
Contact:

Postby H4nd0 » Tue Nov 21, 2006 5:30 am

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!


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 314 guests