Autoanswer ...
Sì, questo è possibile. Come suggerito da @Wosi, è possibile scrivere un batch e quindi chiamarlo con il parametro $f
aggiunto.
lotto di campioni (signtool.bat):
@echo off
"PATH_TO_SIGNTOOL\signtool.exe" sign /v /du "COMPANY_NAME" /fd sha1 /t "http://timestamp.verisign.com/scripts/timstamp.dll" /f "sha1_cert.pfx" /p PASSWORD %1
set SIGN_RESULT_1=%ERRORLEVEL%
"PATH_TO_SIGNTOOL\signtool.exe" sign /as /v /du "COMPANY_NAME" /fd sha256 /tr "http://timestamp.comodoca.com/rfc3161" /td sha256 /f "sha256_cert.pfx" /p PASSWORD %1
set SIGN_RESULT_2=%ERRORLEVEL%
set /a RESULT=%SIGN_RESULT_1%+%SIGN_RESULT_2%
if %RESULT% NEQ 0 (
echo Warning! Signing failed with %SIGN_RESULT_1% for sh1 and %SIGN_RESULT_2% for sha256
pause
exit /B %RESULT%
)
echo Signing succeeded
exit /B 0
Poi nel Inno Setup è possibile chiamare signtool.bat $f
dove sarà passato al %1
$f
per il lotto.
Per la compatibilità di Windows XP per SHA1: rimosso /as
, /tr
sostituito con /t
, rimosso /td
(in quanto richiede /tr
)
Lascio qui come forse qualcuno potrebbe trovare utile.
Perché non dovrebbe essere possibile? È possibile passare un file batch come il firmtool che chiama signtool.exe due volte. – Wosi