Using the Post-Compress examples from the InstallAware article at
http://www.installaware.com/blog/?p=416, the build log when building from the IDE consistently ends with the error shown in the last line :
Building Project: MSCodeSignTest
Output Folder: D:\Documents\!Notes\Installer\dist\Release\SingleDeployment Type: Compressed Single Self Installing EXE
Code Signing: Disabled
Compression: Default
Compiler Variables: CERT_FOLDER=C:\Cert,"POST-COMPRESS-EVENT-COMMANDS=""#CERT_FOLDER#\SignTool.exe"" sign /f ""#CERT_FOLDER#\Codesign_Certificate.pfx"" /t
http://timestamp.verisign.com/scripts/timstamp.dll /p <Codesign_Certificate_pfx_password> ""D:\Documents\!Notes\Installer\dist\Release\Single\#TITLE#Setup.exe""$NEWLINE$$NEWLINE$""#CERT_FOLDER#\SignTool.exe” sign /f ""#CERT_FOLDER#\Codesign_Certificate.pfx"" /as /fd SHA256 /tr
http://timestamp.geotrust.com/tsa /td SHA256 /p <Codesign_Certificate_pfx_password> “D:\Documents\!Notes\Installer\dist\Release\Single\#TITLE#Setup.exe”",POST-COMPRESS-EVENT-ABORT=TRUE,BUILDMODE=SFX,LANGUAGE=English,TITLE=MSCodeSignTest,TARGETDIR=$TARGETDIR$,"IADIR=E:\Program Files (x86)\InstallAware X3",PROJDIR=D:\Documents\!Notes\Installer\MSCODE~1,IAVER=20.10
###
Cleared output folder D:\Documents\!Notes\Installer\dist\Release\SingleBuilt plug-in action (Un)Install MSI Setup
Copied file E:\Program Files (x86)\MSCodeSignTest\dummy.exe
Created Windows Installer database
Built installation executable
Injected setup languages
Injected runtime files
Compressing install: componentstree.dfm (0%)
Compressing install: MSCodeSignTestSetup.msi (0%)
Compressing install: MSCodeSignTestSetup.exe (35%)
Compressed setup files
Prepared SFX data
Created SFX file
Error during build: Post-Compress command ""C:\Cert\SignTool.exe” sign /f "C:\Cert\Codesign_Certificate.pfx" /as /fd SHA256 /tr
http://timestamp.geotrust.com/tsa /td SHA256 /p <Codesign_Certificate_pfx_password> “D:\Documents\!Notes\Installer\dist\Release\Single\MSCodeSignTestSetup.exe”" failed
It should be noted that the 1st Post-Compress event using the SHA1 timestamp URL works without error. The 2nd Post-Compress event is the one that fails. The RFC-3161 SHA256 timestamp URL is different than the SHA1 timestamp URL (which is as expected). It should be noted that several RFC-3161 SHA256 timestamps URLs from various vendors were tried and all failed.
Secondary question: Is there a way to capture a Build Event exit code?
!! UPDATE -- UPDATE -- UPDATE -- UPDATE !!!!!!!!!!!!!!!!!!!!
Removing all double quotes in the 2nd statement results in completion without error. In this case the double-quotes for the 2nd statement were not necessary because there are no spaces in any of the path names in the statement. While that works for me in this case, it still does not explain why it works WITH quotes in the 1st statement. The only difference between the 1st and 2nd statements is the additional command line options and the timestamp server URL.