【发布时间】:2014-05-07 12:59:35
【问题描述】:
我正在编写一个具有 gui 的 vb 脚本,并且还写入注册表,并安装我拥有的证书。
在编写代码后,我使用 iexpress 创建一个 exe 文件,该文件将运行所有文件(cer 和 reg 文件)并安装我的脚本。
问题是我没有看到注册和证书正在安装。
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
【问题讨论】:
-
您是否将yes定义为6? [链接] (msdn.microsoft.com/en-gb/library/139z2azd(v=vs.90).aspx)
-
什么?我不这么认为。
-
问题是我没有看到它工作(reg 和 cer)
标签: vbscript registry certificate cer