sFilename = "DomainControllerCert.p7b" 'Default filename ' Prompt user for DC Cert On Error Resume Next Wscript.Echo "Click OK and select the Domain Controller certificate to install." Set objDialog = CreateObject( "SAFRCFileDlg.FileOpen" ) ' "Only available on WinXP"? If objDialog.OpenFileOpenDlg Then sFilename = objDialog.FileName Else Wscript.Echo "Aborted!" Wscript.Quit 0 End If On Error Goto 0 Set oShell = WScript.CreateObject("WScript.Shell") ' Install cert oShell.Run "cmd /C certreq -accept " & Chr(34) & sFilename & Chr(34), 0, True oShell.Run "cmd /C gpupdate /force", 0, True oShell.Run "cmd /C certutil -pulse", 0, True Wscript.Echo "Done! Click OK and verify that the certificate was installed." 'Let the user verify (These two doesn't work from inside the script..?) oShell.Run "cmd /C certutil -viewstore MY", 0, True oShell.Run "cmd /C certutil -store MY > " & Chr(34) & "2. InstallDomainControllerCert.log" & Chr(34), 0, True