title: Iterate through Registry Subfolders
body: <p>I want to get all values of a registry path include the values of its subfolders. Right now i read the values of a single folder by this:</p>
  
  <pre><code>const HKEY_LOCAL_MACHINE = &amp;H80000002
  strComputer = "."
  
  Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &amp;_ 
  strComputer &amp; "\root\default:StdRegProv")
  
  strKeyPath = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
  oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
  
  For Each subkey In arrSubKeys
      msgbox subkey ' Just for debugging
  Next
  </code></pre>
  
  <p>This works great, but in addition i need to get a list of the folder's subfolders. </p>
  
  <p>I want to get a result (only the content is important, not the formatting and no need to write it into a file) like the this would command gives me:</p>
  
  <pre><code>regedit /e c:\testfile.reg   
  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
  </code></pre>
  
  <p>Is there a way to do this in vbs or do i need to use the regedit command from windows, with an Wscript.Shell call.</p>