I am exploring the reliability of the following two ways to get the Windows Patch Information.
Below are the queries I have for the above two methods
Using Windows Update Agent - IUpdateSearcher Interface with COM.
Using WMIC QFE GET (Either through client or WMI Interfaces with COM)
Also, Of the above two ways,
Could someone provide answers for all my queries?
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.