11

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.

Tisho
  • 8,320
  • 6
  • 44
  • 52
Devloper
  • 219
  • 2
  • 5
  • 12

2 Answers2

15

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.

0xC0000022L
  • 20,597
  • 9
  • 86
  • 152
  • Thank you for answer. This will help me in Identifying the number of Updates and Hotfixes installed. I need to know the name of the update , manufacturer , Install date , Version and so on... I need to know the details which i am seeing in appwiz.cpl. Thank you, Again for the valuable peace of the information. – Devloper Feb 25 '11 at 09:35
  • Hello All, I want the registry location or some way to find the details which we are seeing on appwiz.cpl. – Devloper Mar 08 '11 at 06:46
  • @Devloper: you should ask a separate question for such things, but in general the answer is: `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall`. – 0xC0000022L Mar 08 '11 at 13:49
  • there's something which I'm very curious, in `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based` there are mulitple entries for same update, e.g. in the form of: `Package__for_KB4489885~~amd64~6.1.1.10` where X varies from 1 to 100+. what are those `Packages`? – Sajuuk Jul 03 '19 at 08:22
  • @Sajuuk no idea, but I think this qualifies for a question of its own? – 0xC0000022L Jul 03 '19 at 10:03
  • @0xC0000022L created: questions/56869303/ – Sajuuk Jul 03 '19 at 11:41
4

The best location I have found for Security and Hotfixes applied to the system is the WMI QFE object list (WMIC QFE GET). This has proven accurate on all 6.x and later OS (Vista, W2008, Win7). W2003 also provides QFE but the entries are duplicated in the standard uninstall list.

AdvApp
  • 1,094
  • 1
  • 14
  • 27