How to detect if a Microsoft KB update is installed.

Got a problem you cannot solve? Try here.
mdavtec
Posts: 27
Joined: Wed Jan 20, 2016 2:59 pm

How to detect if a Microsoft KB update is installed.

Postby mdavtec » Fri Dec 30, 2016 4:31 pm

During installation, I want to check if specific KB update is installed on the system or not. Is there a way to do that using InstallAware API? Any suggestion.
ExchA

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: How to detect if a Microsoft KB update is installed.

Postby bokkie » Sat Dec 31, 2016 5:49 am

Good morning, MDA.

Adter a bit of research I started off looking at my Win 7 (64-bit) registry and I searched for a particular KB which I found. The only problem is that the KB name was embedded in some nasty looking keys and I'm reluctant to suggest it as as a viable solution but it's do-able...just have some aspirin to ease the pain.

Otherwise, you could use the systeminfo command in a DOS command and redirect its output to a text file. You could then use IA's statements to read the file and check each line to see if you can find the KB reference you're looking for. The text file would at least be relatively stress free to process. It's been many a blue moon since I used it but there's also the DOS command findstr where you can use regular expressions which might help. My final counsel is that if you try the latter approach, do it inside a native engine-only block of code because it seems you need to find out if a KB is installed at a particular point in your script?

I've not heard of any API that can give it back to you but it's possible that Windows WMI might have a select option that returns the information another way. Hope this sort of helps you.
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP


Return to “Technical Support”

Who is online

Users browsing this forum: Google [Bot] and 51 guests