title: How can I query Windows registry keys from Linux?
body: <p>I am developing a Linux auditing application that, among other things, has to retrieve installed software and licenses from a Windows machine. The application MUST be agent-free. 
  wmi-client actually does implement what I want, I tryed to query applications and it worked just fine:</p>
  
  <pre><code># LAUNCHING WMIC PLUGIN 
  my $cmd = "wmic -U ".$username."%".$password." //".$hostname." \"select Name, Version from Win32_Product\"";
  my $output = `$cmd`;
  print "INSTALLED SOFTWARE:\n";  
  print "$output";
  </code></pre>
  
  <p>Now my question is, how can I retrieve the Product Key for certain applications? I know that sometimes they are stored in the Registry Key, can I query them through WMI?</p>
  
  <p><strong>EDIT:</strong> Just found that on a website:</p>
  
  <p><a href="http://social.technet.microsoft.com/Forums/en/winserverGP/thread/5cd1b80a-2f90-4d46-bf65-dba52dcf0c56" rel="nofollow">http://social.technet.microsoft.com/Forums/en/winserverGP/thread/5cd1b80a-2f90-4d46-bf65-dba52dcf0c56</a></p>
  
  <blockquote>
    <p>WQL queries are based on certain WMI classes which offer a set of properties.
    The WMI registry actions instead are based on the "StdRegProv" in the "Default" namespace and certain methods have to be called to get a result. That means a registry query bases WMI filter is not possible.</p>
  </blockquote>
  
  <p>So it looks like WQL cannot interrogate Registry Keys, what can I do then? Any ideas?</p>