Problem building signed installer via script - Advanced Installer Community
markphip
Posts: 20
Joined: Fri Apr 16, 2010 9:03 pm

Problem building signed installer via script

I've been using version 7.7 for a long time and just recently am upgrading to the very latest version. I have updated my setup.aip to latest version and I can successfully build it via the GUI and it all works fine.

I have a build script I have used for years that packages my app and builds the installer via a Jenkins build server. This script now fails when building the installer during the digital signing phase. Here is a redacted copy and paste of output:

Code: Select all

AdvancedInstaller.com /rebuild setup.aip 
Checking builds status... done.

Build required.

[ DefaultBuild ]


Building package (en): 

C:\work\workspace\windows-installer\installer\Setup Files\App-5.0.0_setup.exe 

Preparing files... done.

Signing files from project... The digital signing of some files failed. Error Message:Certificate: Subject[XXX, Inc.] Issuer[DigiCert SHA2 Assured ID Code Signing CA] 

digisign.exe error. Signing file. HRESULT: -2147024703. Error message: %1 is not a valid Win32 application.

digisign.exe sign /a /sha256 /d App Name /du http://www.acme.net/products/app /t http://timestamp.verisign.com/scripts/timstamp.dll APPDIR\bin\admin.exe APPDIR\bin\version.exe APPDIR\bin\gen_test_char.exe APPDIR\bin\happ2dbm.exe APPDIR\bin\app-stats.exe APPDIR\jre\bin\jp2launcher.exe APPDIR\jre\bin\ssvagent.exe APPDIR\jre\bin\pack200.exe ...lots more filenames
So it seems to be failing because I include a Win64 program in my installer .. I do. But the more general issue is that it seems to be trying to sign all of the EXE files in my app. I do not want it to do that, I only want to sign the installer itself. That is what I have always done, and it is what happens when I click Build in the GUI. Why is command line build working differently?

I tried changing my setup script to turn off digital signing completely. I then used the digisign tool in my build script to sign the EXE. That all worked fine (both the build and the signing), but whenever I run the installer on a test system the install ends without any logged errors of consequence (Error code 12) when it gets to the point where it would normally start performing the install. In other words, the installer runs through my wizard but when it starts to do something it just ends. If I run from command line and use the /exelog I just see that error code 12 in the output.

So I am going back to trying to do the signing as part of the setup.aip file. If I build via GUI, I can run installer fine. It is only when building via a command line script I have these problems.

Ideas?

Thanks

Mark
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Problem building signed installer via script

Hello Mark,

I'm not sure why this happens. In order to have a better view of your project settings, can you please send us the .aip (project file) to support at advancedinstaller dot com so we can investigate?

Also, you can configure in our "Digital Signature" page what files should be signed by using the "Files Configured for Signing" section.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
markphip
Posts: 20
Joined: Fri Apr 16, 2010 9:03 pm

Re: Problem building signed installer via script

Daniel,

Thanks. I sent you the aip file in a zip.

Mark

Return to “Common Problems”