我正在编写一个 Powershell 脚本来复制什么signtool.exe
做。我在安装程序 exe 上使用它。
我找到Set-AuthenticodeSignature
使用证书处理文件的签名,但我也在寻找signtool
在文件上签署 ActiveX 控件的功能。
SignTool sign /f MyCert.pfx /t timestampURL /du "webpageURL" /d "mycompany" MyInstaller.exe
Set-AuthenticodeSignature
能够处理/f
and /t
参数与-Certificate
and -TimestampServer
分别。
所以我的问题是,是否有一个 cmdlet 可以处理/d
and /du
?
引用 SignTool 页面:
以下命令对 ActiveX 控件进行签名,并提供当提示用户安装该控件时 Internet Explorer 显示的信息:
SignTool sign /f MyCert.pfx /d "My Product Name" /du "http://www.example.com/my_product/info.html" MyControl.exe
Powershell Cmdlet 中没有等效的描述或 URLSet-AuthenticodeSignature
.
但是,如果 URL 对您的产品很重要,您仍然可以从 Powershell 调用 Signtool。我会像这样使用调用运算符来解决问题:
$signString = 'Signtool.exe sign /f MyCert.pfx /d "My Product Name" /du "http://www.example.com/my_product/info.html" MyControl.exe'
& $signString
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)