Signtool error installing Inno with exit code 0x1

Suddenly my Inno Setup compiler stops working. Since the last time I used it, I just installed a new certificate issued by another company.

I configured the sign tool this way (NAME is the start of the line for Subject in the certificate):

mysigntool="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\signtool.exe" sign /v /a /s my /n NAME /t http://timestamp.verisign.com/scripts/timestamp.dll

      

And then in the INSI Setup Inn file I have:

SignTool=mysigntool
SignedUninstaller=yes

      

The sign always fails with exit code 0x1, also if I remove / t and timestamp. Please note that if I run the same command from the command line the signature works fine.

+3


source to share


2 answers


You need to add $f

to the end of your SignTool (in your IDE settings, not a script) to actually pass the name of the file to be signed. This is why you are getting "missing filename" error.



See the Inno help file for examples .

+4


source


The first thing to try is obviously running offline signtool.exe

to see what errors it throws.

(I know you've tried this already).




If you cannot reproduce the problem this way, run the Inno Setup compiler from the command line. You will see the output signtool

along with the output of other compilers.

If it signtool

fails, when compiling from GUI Inno Setup, its console just blinks briefly, so you have no chance of seeing its output.




Alternatively, you can wrap signtool.exe

in a batch file and call the package from Inno Setup instead signtool

. At the end of the batch file, call pause

if signature fails. So you can see this error even in the Inno Setup GUI.

The batch file might look like this:

@echo off

c:\path\signtool.exe %*

set SIGN_RESULT=%ERRORLEVEL%

if %SIGN_RESULT% equ 0 (
  echo Signing succeeded
  exit /B 0
)

echo Signing failed with %SIGN_RESULT%
pause

exit /B %SIGN_RESULT%

      




See also Inno Setup - Signing failed with "Sign Tool with Code 0x1" .

+2


source







All Articles