【发布时间】:2020-05-05 17:45:35
【问题描述】:
我已经在 Cert:\LocalMachine\Root 中创建了一个用于代码签名的证书,但是当我尝试签署我的程序 (example.exe) 时,它给了我未知错误。
我已经尝试了所有可以在互联网上找到的解决方案,但没有一个有效。
$cert = New-SelfSignedCertificate -Subject "Certificate" -Type CodeSigningCert -CertStoreLocation cert:\LocalMachine\My
然后我打开证书管理器并将其移至受信任的根权限
Set-AuthenticodeSignature -FilePath 'C:\programs\example.exe' -Certificate $cert
错误:
SignerCertificate Status Path
----------------- ------ ----
UnknownError example.exe
【问题讨论】:
-
您的问题中没有足够的信息来诊断问题。确切的错误信息是什么?
Set-AuthenticodeSignature的帮助指出:“[...] 向任何支持主题接口包 (SIP) 的文件添加 Authenticode 签名。”你的*.exe文件是这样吗?请直接更新您的问题(不要回复评论)。