3

I have Inno Setup and a CSC... I tried following Inno Setup's documentation to get Code Signing set up. I mainly do this because I want to code sign the uninst***.exe file.

Upon compilation, I get this error:

Running Sign Tool command: signtool sign /f <absolute_path_that_exists>\<file_that_exists>.p12 /p <some_cool_password> /fd sha256 /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /v "<absolute_path_that_exists>\uninst.e32.tmp"

Sign Tool command failed (Failed to execute Sign Tool.
Error 2: The system cannot find the file specified). Will retry (2 tries left).

My Inno Setup .iss file has this in it:

SignTool=standardcsc
SignedUninstaller=yes

where standardcsc is:

signtool sign /f <absolute_path_that_exists>\<file_that_exists>.p12 /p <some_cool_password> /fd sha256 /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /v $f

The only file that does not exist is <absolute_path_that_exists>\uninst.e32.tmp"

I'm not entirely sure if I'm getting this right... Why is Inno Setup attempting to sign a file that does not exist?

I am stumped, I do not know how to fix the problem... Please help!

Thank you.

  • 2
    Can you open a command prompt and run that exact command from there and have it work? If not, the problem has nothing to do with Inno Setup. The error message seems more like it's saying it couldn't find signtool.exe itself (*The system cannot find the file specified*, not *signtool cannot find the file specified*). Do you have signtool.exe on your computer somewhere on your PATH? – Ken White Apr 19 '18 at 22:17
  • This question is not a duplicate of the linked question as it relates to a different error. – j b Jun 26 '20 at 09:14

2 Answers2

2

The problem has to do with you SignTool command, the signtool command is probably not found. To fix this, either make sure signtool.exe is in Windows "SYSTEM" PATH, otherwise you can specify the path to signtool.exe in the command. It should be something like C:\Program Files (x86)\Windows Kits\10\bin\x64\signtool.exe if you can't find it.

If you still can't get it working, you can try temporarily adding cmd.exe /k before the SignTool command setting in InnoSetup to see more detailed logs for debugging. In my situation, even though I thought I added signtool.exe in user PATH, since InnoSetup in running in a different shell, it cannot find the command signtool.exe. After I substitute it with the absolute path to signtool.exe, it works.

rasca0027
  • 101
  • 7
0
Failed to execute Sign Tool

This tells you, that it did not find your signtool and that you shall use an absolute path to it or make it available in your PATH environment variable.


It has nothing to do with your certificate in this question.

Vlastimil Burián
  • 3,024
  • 2
  • 31
  • 52