title: VBA automation error for regRead
body: <p>I am trying to automate a project's routine task of filling excel sheet via Excel VBA. One of column in Excel requires latest date of Windows Update. 
  I wrote below subroutine to achieve the same.</p>
  
  <pre><code>Sub windowsUpdate()
      Dim windowShell
      Dim regValue
  
      Set WindowShell = CreateObject("WScript.shell")
  
      regValue = WindowShell.regRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Install\LastSuccessTime")
      WScript.echo "Updated date is : " &amp; regValue
  End Sub
  </code></pre>
  
  <p>With this I am getting either of 2 errors similar to below .When try to execute the same.</p>
  
  <blockquote>
    <p>Invalid Root in registry key
    "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto
    Update\Results\Install\LastSuccessTime"</p>
  </blockquote>
  
  <p><strong>OR</strong></p>
  
  <blockquote>
    <p>Automation Error: Can not find specified path</p>
  </blockquote>
  
  <p>I am at very initial level of Excel VBA , any guidance for above two errors will be of great help.</p>