我正在寫一個vb腳本,它有gui,並且還會寫入註冊表,並安裝我擁有的證書。如何編寫一個VB腳本,添加reg並安裝cer - 我已經在exe包中
寫完代碼後我使用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
無碼
Else
聲明中有你定義的是作爲6? [鏈接](http://msdn.microsoft.com/en-gb/library/139z2azd(v=vs.90).aspx) – Rob1991什麼?我不這麼認爲。 – user3433101
和問題是,我沒有看到它的工作(reg和cer) – user3433101