title: VBS - how to get DOMAIN proxy settings for a machine?
body: <p>The following code in a VB Script file will allow me to get the proxy enabled flag on a machine.   For example, I do not have the proxy enabled on my machine, so it returns "0".</p>
  
  <p>However, these are Windows Domain computers and in most cases I am getting back nothing - not 0, but a blank.  </p>
  
  <p>I am assuming this is because I have a domain policy that is enforcing the proxy settings (as ON).</p>
  
  <p>SO, the question is how do I read that?   Is it a different registry key, or do I have to read something completely different like network settings somehow?</p>
  
  <pre><code>const HKEY_CURRENT_USER = &amp;H80000001
      Set oReg=GetObject( _
     "winmgmts:{impersonationLevel=impersonate}!\\" &amp;_
      strComputer &amp; "\root\default:StdRegProv")
  strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings"
  strValueName = "ProxyEnable"
  oReg.GetDWORDValue _
     HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue
  </code></pre>