我正在编写一个具有 gui 的 vb 脚本,还写入注册表,并安装我拥有的证书。
编写代码后,我使用 iexpress 创建一个 exe 文件,该文件将运行所有文件(cer 和 reg 文件)并安装我的脚本。
问题是我没有看到 reg 和 certicate 安装。
test=MsgBox("To configure wsus on you pc",4,"Wsus installation")
If test = yes Then
Set WshShell = Wscript.CreateObject("Wscript.Shell")
shell 'regedit -add "\\WSUS.reg"'
shell 'certmgr -add -c "\\wsus.cer" -s -r localMachine root'
shell 'certmgr -add -c "\\wsus.cer" -s -r localMachine trustedpublisher'
RestartServices "localhost", "wuauserv"
If Err.Number <> 0 Then
MsgBox (Err.number & "-" & err.Description)
else
MsgBox "Certificate Install completed"
End If
Else
End If