新打包的游戲執行檔出現 smartscreen 警告,需要使用 code sign 簽章
下載 signtool.exe
生成證書
使用系統管理員開啓 power shell
啟用ExecutionPolicy 為 Bypass
Set-ExecutionPolicy Bypass -Scope Process
$cert = New-SelfSignedCertificate -DnsName uj.com.tw -CertStoreLocation cert:\LocalMachine\My -type CodeSigning $pwd = ConvertTo-SecureString -String “123456” -Force -AsPlainText Export-PfxCertificate -cert $cert -FilePath cert_hslr.pfx -Password $pwd
生成證書如下
執行簽章
.\signtool.exe sign /f certhslr.pfx /p 123456 /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 D:\OlgCase\RS\Build5\HSLR.exe
查看執行檔上面的簽核信息
驗證執行檔.\signtool.exe verify /pa /v D:\OlgCase\RS\Build_5\HSLR.exe
留言
張貼留言