title: How do I get a list of installed updates and hotfixes?
body: <p>A list of every update and hotfix that has been installed on my computer, coming from either Microsoft Windows Update or from the knowledge base. I need the ID of each in the form of KBxxxxxx or some similar representation...</p>
  
  <p>Currently I have:</p>
  
  <pre><code>const string query = "SELECT HotFixID FROM Win32_QuickFixEngineering";
  var search = new ManagementObjectSearcher(query);
  var collection = search.Get();
  
  foreach (ManagementObject quickFix in collection)
      Console.WriteLine(quickFix["HotFixID"].ToString());
  </code></pre>
  
  <p>But this does not seem to list everything, it only lists QFE's.</p>
  
  <p>I need it to work on Windows XP, Vista and 7.</p>