installation - Upgrading to Inno Setup v6 - SignTool=sha1 no longer works - Stack Overflow

admin2025-02-14  3

I'm trying to upgrade Inno Setup 5 to the most recent version 6. I compile my script from the command line using ISCC.exe.

My setup includes these two lines in the [Setup] section:

SignTool=sha1
SignTool=sha256

The ISCC command looks like:

ISCC.exe "/ssha1=signtool.exe sign /f Certificate.pfx /p MyPassword /t  /v $f" "/ssha256=signtool.exe sign /f Certificate.pfx /p MyPassword /fd sha256 /tr /?td=sha256 /td sha256 /as /v $f"  MySetup.iss

This no longer works in Inno Setup v6, I get the error:

Value of [Setup] section directive "SignTool" is invalid

What's the correct way to do this is Inno Setup v6? Thanks.

I'm trying to upgrade Inno Setup 5 to the most recent version 6. I compile my script from the command line using ISCC.exe.

My setup includes these two lines in the [Setup] section:

SignTool=sha1
SignTool=sha256

The ISCC command looks like:

ISCC.exe "/ssha1=signtool.exe sign /f Certificate.pfx /p MyPassword /t http://timestamp.comodoca.com /v $f" "/ssha256=signtool.exe sign /f Certificate.pfx /p MyPassword /fd sha256 /tr http://timestamp.comodoca.com/?td=sha256 /td sha256 /as /v $f"  MySetup.iss

This no longer works in Inno Setup v6, I get the error:

Value of [Setup] section directive "SignTool" is invalid

What's the correct way to do this is Inno Setup v6? Thanks.

Share Improve this question edited Jan 4 at 17:39 marc_s 755k184 gold badges1.4k silver badges1.5k bronze badges asked Jan 4 at 16:28 Waits321Waits321 594 bronze badges 4
  • Find the docs about "[Setup]SignTool" and read: Valid values: A name followed by zero or more parameters, space separated – Luuk Commented Jan 4 at 16:56
  • I read that but cannot make it work. I put all the parameters under the SignTool command but it doesn't work. Could you help me with showing the exact commands I need to make? – Waits321 Commented Jan 4 at 22:17
  • Even the examples on the help screen do show that you have the wrong parameters. I suggest you correct them, and try using the (more correct) parameters. – Luuk Commented Jan 5 at 10:12
  • I'm struggling to reproduce this issue. Both the SignTool directives and the command-line arguments seem to be correctly set. I'm getting that error you posted only when I have a SignTool in my .iss file that's not provided via command line. Do you have a third SignTool in your .iss file somewhere? Can you provide a minimal reproducible example? – mwopitz Commented Jan 6 at 12:49
Add a comment  | 

1 Answer 1

Reset to default 2

I've only had luck defining the sign tool name and command through the compiler IDE for Inno Setup 6.

Based on your [Setup] example, it looks like you want to have two sign tool directives set, sha1 and sha256.

To set these up in Inno Setup 6, in the compiler IDE, select Tools > Configure Sign Tools..., then click Add:

  1. Name: sha1

    Command: signtool.exe sign /f Certificate.pfx /p MyPassword /t http://timestamp.comodoca.com /v $f

  2. Name: sha256

    Command: signtool.exe sign /f Certificate.pfx /p MyPassword /fd sha256 /tr http://timestamp.comodoca.com/?td=sha256 /td sha256 /as /v $f

After performing these steps, you can either compile your Inno Setup 6 script with either the compiler IDE or with ISCC.exe, and it will sign your executable. If running with ISCC.exe, you do not need to add the /S option (per the docs, any sign tool configured using the Compiler IDE will be specified automatically).

转载请注明原文地址:http://anycun.com/QandA/1739507795a18053.html