如何使用 InnoSetup (ISCC.exe) 和 DigiCerts smctl.exe 创建签名卸载程序?

问题描述 投票:0回答:1

我使用 smctl.exe 在我们的构建服务器上签署桌面应用程序。 我使用包含 /S 参数的 *.iss 文件调用执行 iscc.exe,如下所示:

/Dsigning=true /Dbuildworkingdir=${bamboo.build.working.directory} ${bamboo.build.working.directory}\150_Software\10_SW\InnoSetup\EPCSetup.iss "/Ssigntool=smctl.exe sign --keypair-alias key_XXXXXXXX --input $f"

这会生成正确签名的“setup.exe”。

只要我的 *.iss 文件中有这一行,这就可以工作:

SignedUninstaller=no

一旦切换到

SignedUninstaller=yes
,构建就会失败。

以下是竹日志的相应摘录:

build   27-Sep-2023 08:09:20    Preparing Setup program executable
build   27-Sep-2023 08:09:20       Updating version info (SETUP.E32)
build   27-Sep-2023 08:09:21       Running Sign Tool signtool: C:\Program Files\DigiCert\DigiCert Keylocker Tools\smctl.exe sign --keypair-alias key_XXXXXXXXX --input "D:\Atlassian\ApplicationData\Bamboo\local-working-dir\360449\CFN-DIG-JOB1\150_Software\10_SW\InnoSetup\Output\uninst.e32.tmp"
build   27-Sep-2023 08:09:24    There were no files found for signing
error   27-Sep-2023 08:09:24    Error in D:\Atlassian\ApplicationData\Bamboo\local-working-dir\360449\CFN-DIG-JOB1\150_Software\10_SW\InnoSetup\EPCSetup.iss: The Sign Tool command returned an exit code of 0, but the file does not have a digital signature.
error   27-Sep-2023 08:09:24    Compile aborted.

我的调查显示 smctl.exe 使用 Microsoft Signtool.exe 进行签名。 Signtool.exe 只能对可执行文件进行签名。

现在我无法再继续下去了。 InnoSetup 想要签署“uninst.e32.tmp”,但 smctl.exe 拒绝。有人知道这个问题吗?我能做些什么? 另外:为什么 InnoSetup 尝试签署 *.tmp 文件?

任何提示将非常感激。

inno-setup code-signing signtool
1个回答
0
投票

uninst.e32.tmp
是一个可执行文件,只是带有
.tmp
扩展名。

根据错误消息,看起来

smctl
甚至没有尝试对文件进行签名。所以问题不在于文件本身,而可能在于它的名称(扩展名)。

将文件重命名为

.exe
可能会解决问题。您可以编写一个脚本(一个简单的批处理文件即可)来重命名该文件,对其进行签名,然后将其重命名回来。并在 Inno Setup 中将该脚本/批处理配置为签名工具。

有关此类批处理文件的一些示例,请参阅

© www.soinside.com 2019 - 2024. All rights reserved.