signtool fail with Inno Setup with exit code 0x1

前端 未结 2 1392
野的像风
野的像风 2020-12-06 13:09

Suddenly my Inno Setup compiler stopped working. Since the last time I used it, I just installed a new certificate issued still to the same company.

I\'ve configured

2条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-06 13:52

    First thing to try is, obviously, to run the signtool.exe standalone, to see, what errors it outputs.

    (I'm aware that you have tried that already).


    If you cannot reproduce the problem this way, run the Inno Setup compiler from command-line. You will see signtool's output along with other compilers output.

    If the signtool fails, when compiling from Inno Setup GUI, its console just briefly flashes, so you have no chance to see its output.


    Alternatively, you can wrap the signtool.exe to a batch file and call the batch from the Inno Setup instead of the signtool. At the end of the batch file, call pause, if the signing fails. This way you can see the error even in Inno Setup GUI.

    The batch file may look like:

    @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 fails with "Sign Tool failed with exit code 0x1".

提交回复
热议问题