1

I am exploring the reliability of the following two ways to get the Windows Patch Information.

  1. Using Windows Update Agent - IUpdateSearcher Interface with COM.
  2. Using WMIC QFE GET (Either through client or WMI Interfaces with COM)

Below are the queries I have for the above two methods

Using Windows Update Agent - IUpdateSearcher Interface with COM.

  1. Does IUpdateSearcher navigates through the following registry and provides the information?
    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing
  2. Are there any other registry paths IUpdateSearcher looks for to give Update information?
  3. Does IUpdateSearcher give a super set of what WMIC QFE gives?

Using WMIC QFE GET (Either through client or WMI Interfaces with COM)

  1. Does WMIC QFE search the following registry path and provides the information? HKEY_LOCAL_MACHINE\Software\Microsoft\Updates (OR) HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Updates
  2. Are there any other registry paths WMIC QFE GET looks for to give Update information?

Also, Of the above two ways,

  1. Which method is the best way to get the Update Information without data loss?
  2. Which method performs faster?

Could someone provide answers for all my queries?

TechyHarry
  • 301
  • 2
  • 8
  • 25

1 Answers1

1

When you uses the WMIC QFE GET command is equivalent to execute a query with the Win32_QuickFixEngineering WMI class, since with Windows Vista, this class returns only the updates supplied by Component Based Servicing, in olders windows versions uses the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Hotfix and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates registry keys to enumerate the updates.

The IUpdateSearcher interface which is part of the Windows Update Agent API (WUA), can be used to enumerate all the fixes including the installed via the CBS, Updates supplied by Microsoft Windows Installer (MSI) or the Windows update site, and so on.

So the more reliable way to get the installed windows updates is using the WUA API.

RRUZ
  • 134,889
  • 20
  • 356
  • 483
  • RRUZ, That is really a great explanation. Thanks.So which locations in registry does Windows Update Agent API scan for? Does any other location in Windows other than registry this information is stored? – TechyHarry Oct 09 '12 at 17:08
  • Will the Windows Update Agent API fails to collect all information as WMIC QFE GET collects in the Operating Systems before Windows Vista? Or WUA API should collect all information. Please help in this regard. – TechyHarry Oct 12 '12 at 13:20