title: Add trusted sites to windows registry for all users
body: <p>I want to add trusted web sites to the windows registry for all users using a VBScript. I currently have a script with me and its given below. I'm neither a Windows guy nor a Visual Basic guy, so I have absolutely no idea whether the script would run or not and would it meet my needs or not. Could someone please explain the script and check whether would it run as expected. </p>
  
  <pre><code>On Error Resume Next
  
  Const HKEY_CURRENT_USER = &amp;H80000001
  
  strComputer = "."
  
  Set objReg = GetObject("winmgmts:" _
    &amp; "{impersonationLevel=impersonate}\\" &amp; strComputer &amp; _
    "\root\default:StdRegProv")
  
  strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings\" _
    &amp; "ZoneMap\EscDomains\google.com"
  
  objReg.CreateKey HKEY_CURRENT_USER,strKeyPath
  
  strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings\" _
    &amp; "ZoneMap\EscDomains\google.com\www"
  
  objReg.CreateKey HKEY_CURRENT_USER,strKeyPath
  
  strValueName = "https"
  dwValue = 2
  
  objReg.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue
  
  strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings\" _
    &amp; "ZoneMap\Domains\google.com"
  
  objReg.CreateKey HKEY_CURRENT_USER,strKeyPath
  
  strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings\" _
    &amp; "ZoneMap\Domains\google.com\www"
  
  objReg.CreateKey HKEY_CURRENT_USER,strKeyPath
  
  strValueName = "https"
  dwValue = 2
  
  objReg.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue
  
  strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings\" _
    &amp; "ZoneMap\EscDomains\hotmail.com"
  
  objReg.CreateKey HKEY_CURRENT_USER,strKeyPath
  
  strValueName = "https"
  dwValue = 1
  
  objReg.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue
  
  strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings\" _
    &amp; "ZoneMap\Domains\hotmail.com"
  
  objReg.CreateKey HKEY_CURRENT_USER,strKeyPath
  
  strValueName = "https"
  dwValue = 1
  
  objReg.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue
  </code></pre>
  
  <p>If you feel this is an inappropiate script, please share the VBScript which you feel that would work.</p>