我正在尝试将 Inno Setup IDE“签名工具”命令设置为使用相对路径。 我制作了一个
sign.bat
脚本,它按照以下文件结构调用 signtool.exe
:
code_sign\
+ sign.bat
+ signtool.exe
+ cert.pfx
script.iss
如果我将签名工具 (
Tools / Configure Sign Tools...
) 命令设置为 code_sign\sign.bat $p
,我收到以下错误消息:
Sign Tool command failed (Failed to execute Sign Tool.
Error 2: The system cannot find the file specified). Will retry (2 tries left).
Running Sign Tool command: sign.bat "(...)\uninst.e32.tmp"
Sign Tool command failed (Failed to execute Sign Tool.
(...)
签名工具调用时的工作路径是怎样的?
遗憾的是,我无法使用绝对路径(有效),因为
code_sign
文件夹是与其他应用程序和其他用户共享的子模块。
我在这里做错了什么?我应该使用命令行版本吗?
sign.bat
内容:
SET script_path=%~dp0
SET stool=%script_path%signtool.exe
SET pfx=%script_path%cert.pfx
SET ntp=http://timestamp.globalsign.com/scripts/timstamp.dll
SET pwd=12345
"%stool%" sign /f %pfx% /p %pwd% /tr %ntp% /td SHA256 %1