title: How to write a VB script that add reg and install cer - that i have in exe package
body: <p>I'm writing a vb script , that has gui , and also write to the registry , and install certificate that i have. </p>
  
  <p>after writing the code i'm using iexpress , to create an exe file that will run all the files (cer and reg files) and install my script . </p>
  
  <p>the problem is that i don't see the reg and certicate installing .</p>
  
  <pre><code>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 &lt;&gt; 0 Then
  MsgBox (Err.number &amp; "-" &amp; err.Description)
  else
  MsgBox "Certificate Install completed"
  End If
  
  Else
  
  End If
  </code></pre>