英文:
Can you use a batch script as a Custom sign tool in Advanced Installer?
问题
在Advanced Installer中,我正在尝试设置它生成的文件进行数字签名。在数字签名部分的设置中,我选择"自定义"作为签名工具。
这里需要填写2个设置:路径和命令行。
我可以在这里指定一个批处理脚本吗?如果可以,具体要如何指定?
对于"路径"字段,我已经指定了C:\code\Myproject\setup\signing\sign.bat
... 而在"命令行"字段中:sign.bat <file_name>
(是的,我在那里两次使用了sign.bat - 不太确定)
(另外,我在那里字面上放入了<file_name>,因为在Advanced Installer用户指南中是这样规定的,假设它是配置用于签名的文件部分中指定的实际文件的占位符)
然而,当我尝试构建我的安装程序时,我收到以下错误:
APPDIR\MyApplication\MyApplication.exe文件的数字签名失败。错误消息:'系统找不到指定的文件。
这是一个未知的"signtool.exe"错误!有关可能的解决方案,请查看我们的数字签名FAQ:
https://www.advancedinstaller.com/user-guide/faq-digital-signature.html
提供的FAQ似乎没有显示答案。
这是否可行,如果是,正确的指定方式是什么?
英文:
In Advanced Installer, I'm trying to set up the files it generates to be digitally signed. In the Digital Signature section, Settings, I choose "Custom" as the Sign Tool.
There are 2 settings needed to be filled in here: Path and Command Line.
Can I specify a batch script here? If so, how exactly is this specified?
For the "Path" field, I have specified C:\code\Myproject\setup\signing\sign.bat
... and in the "Command line" field: sign.bat <file_name>
(Yeah I have sign.bat in there twice - wasn't sure about this)
(Also I have put in <file_name> literally in there as it specifies in the Advanced Installer User guide on the assumption that it's a placeholder for the actual files that are specified in the Files Configured for Signing section)
However, when try to build my installer, I get this error:
> The digital signing of the APPDIR\MyApplication\MyApplication.exe file failed. Error message: 'The system cannot find the file specified.
> This is an unknown "signtool.exe" error!
>
> For a possible solution please check our Digital Signature FAQ from:
> https://www.advancedinstaller.com/user-guide/faq-digital-signature.html  '
The provided FAQ doesn't appear to show the answer.
Is this possible, and if so what is the correct way to specify it?
答案1
得分: 1
你不能在“Path”字段中指定BAT文件。只能引用“Signtool.exe”可执行文件。
你在BAT文件中配置的命令行参数必须由你自己定制的“SignTool.exe”应用程序文件处理和实现。
英文:
You cannot specify a BAT file in the "Path" field. There can be referenced only a "Signtool.exe" executable file.
The command line parameters you configured in the BAT file must be handled and implemented by your own custom built "SignTool.exe" app file.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。


评论