【发布时间】:2017-01-09 00:43:45
【问题描述】:
我想安装 Balloon 驱动程序以在 KVM 中运行我的 Windows 而无需用户进行任何交互(静默安装)。
我正在使用 powershell 将证书从驱动程序中提取到某个临时文件,然后使用 certutil.exe 将其导入到 TrustedPublisher:
$cert = (Get-AuthenticodeSignature "D:\Balloon\2k12R2\amd64\blnsvr.exe").SignerCertificate; [System.IO.File]::WriteAllBytes("c:\redhat.cer", $cert.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::Cert));
certutil.exe -f -addstore "TrustedPublisher" c:\redhat.cer
然后我可以通过确认安装驱动程序而无需打扰用户:
pnputil -i -a "d:\Balloon\2k12R2\amd64\*.inf"
如何改进此任务以在 powershell 中完成所有任务 - 无需将证书提取到临时文件并使用 certutil.exe 导入它?
【问题讨论】:
标签: powershell installation certificate driver silent