title: Get first record from WMI ExecQuery
body: <p>I have a simple vbscript for retrieving the Windows version:</p>
  
  <pre><code>Set objWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
  Set colVersions = objWMI.ExecQuery("Select * from Win32_OperatingSystem")
  
  For Each objVer in colVersions
     ver = objVer.Version
  Next
  </code></pre>
  
  <p>Is is possible to get the first record or do I have to loop over all records in the collection. All examples I've seen are with <code>For Each</code> construction. I receive <em>Expected end of statement</em> error when I try:</p>
  
  <pre><code>ver = colVersions[0].Version
  </code></pre>
  
  <p>It looks like the return value of <code>ExecQuery</code> is not a proper collection.</p>