使用Inno Setup软件直接给安装程序和卸载程序加数字签名
宏定义字段
添加 define MySignTools “mysigntools”
define MySignTools "mysigntools"
[Setup]字段
添加 SignTool={#MySignTools}
添加 SignedUninstaller=true
SignTool={#MySignTools}
SignedUninstaller=true
打开Inno Setup,选择Tools里的Configure Sign Tools
任意输入你的签名工具名称,这里的是mysigntools
这里的参数是
$qD:\0workfile\newlineengage_new\xhero\Bin\Digsign_new\signtool.exe$q sign /f $qD:\0workfile\newlineengage_new\xhero\Bin\Digsign_new\xxx.pfx$q /p "123" /t $qhttp://timestamp.comodoca.com/authenticode$q $f
更改上边参数的路径
D:\0workfile\newlineengage_new\xhero\Bin\Digsign_new\signtool.exe
D:\0workfile\newlineengage_new\xhero\Bin\Digsign_new\xxx.pfx
把这两个路径换成你自己的即可
直接运行就行,需要输入自己的证书账号和密码,运行完成后,可以看到安装程序Setup.exe和卸载程序unins000.exe的数字签名已加上。
就这样就完事了,希望能帮助到你,感谢阅读。