Registry key location for security update and Hotfixes

Devloper picture Devloper · Feb 24, 2011 · Viewed 93.8k times · Source

In my application i want to query the Security update and Hotfixes on windows box. For this i have queried the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall Everything went well on the OS other than windows 2008 server and windows 7...

When running appwiz.cpl on Windows 2008 server machine it is showing the lot of Hotfixes and security updates but their is no entry for any of them in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall. It seems like windows has changed the registry location for windows 2008 server and Windows 7.

I need to query the details of the Security updates and Hotfixes.

Answer

0xC0000022L picture 0xC0000022L · Feb 24, 2011

With Windows 7 they introduced patches that are being applied using .msu files (MSU == Microsoft System Update).

One way is to enumerate the keys on HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages and then check the (string) value InstallClient for the "WindowsUpdateAgent".

You can apparently use the Windows Update Agent API to read it independent of the registry location.