title: Explain VBScript WMI query / impersonationLevel, etc
body: <pre><code>Dim strComputer, objReg, ScriptName, strKeyPath, strValueName, strValue
  Const HKEY_LOCAL_MACHINE = &amp;H80000002
  strComputer = "."
  
  Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &amp; _
      strComputer &amp; "\root\default:StdRegProv")
  </code></pre>
  
  <p>This is a piece of a larger script that I am trying to reverse engineer for work. Original coder not available.</p>
  
  <p>I have tried to research and understand the last line of code but I can't find any good info on the net and I am not that good at vbs.</p>
  
  <p>As far as I can tell:
  - objreg is a SWbemObjectEx type object.
  - winmgmts:{impersonationLevel=impersonate} lets the object use the caller's security level (in my case system)
  - StdRegProv should point to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WBEM\Scripting\Default Impersonation Level</p>
  
  <p>I kind of get what it's supposed to do but I don't get how it does it play by play.</p>
  
  <p>If anyone can explain procedurally word by word what it does including stuff like  "!\",
  I would greatly apreciate it. Thank you.</p>