I'm looking how to get programmatically the KB of latest security update, currently in use on local computer . Any tips ? I've tried some thins like wuapi but i'm not getting any results . I wanna check if the MS17-010: Security update for Windows SMB is in use .
Asked
Active
Viewed 119 times
-1
-
Can you be more specific about what you're looking for? There are many security updates. Do you want the very last one installed, and if so why? It's unlikely that information would be of any use. – Asteroids With Wings Aug 17 '20 at 13:50
-
I'm looking to check if MS17-010: Security update for Windows SMB is in use – dcasda Aug 17 '20 at 13:57
-
3So, that's not the same thing as looking for the "latest" security update. You're trying to query whether a particular update is installed. You could (and probably do!) have other updates installed after that one. – Asteroids With Wings Aug 17 '20 at 13:58
-
`check kb installed windows` on Google gives me useful information... – Asteroids With Wings Aug 17 '20 at 13:59
-
I'm looking to get it programmatically. I thought that an older version is installed if the current one i get as the latest is a newer version – dcasda Aug 17 '20 at 14:03
-
I think you can (somehow) tell Windows not to install specific updates, so they don't have to be installed in order. – user253751 Aug 17 '20 at 14:24
1 Answers
0
To check a specific update programmatically, you can for example query the registry. Under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages
a key with the name that contains the KB identifier should be present (eg. "Package_for_KB111111_...
"), and under that the CurrentState
value is decimal 112 if it is fully installed.
MS17-010 is KB4012598.
Some more info with other possible statuses and more is here.

Gabor Lengyel
- 14,129
- 4
- 32
- 59