Page 1 of 1 1
Topic Options
#188365 - 2008-06-25 09:49 PM Reliable method of detecting hotfixes?
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
Does anyone know of a reliable method to detect all installed hotfixes on current Windows systems (including Vista/2K8)?

I ran a test today on a Windows 2003 server using my "tried & true" registry scan method, WMI, and Microsoft Update Session queries. The registry methods work on windows systems from NT to 2K3; WMI operates on W2K to W2K3, but not NT or Vista/2K8. MUS works only on newer systems - XP & higher that have a Windows Update client installed, and is the only detection method supported on Vista/2K8.

In my test, I used 3 methods to return delimited strings. I combined all 3 strings, split them into an array, sorted the array and removed duplicates. With this "complete" list of detected hotfixes, I could compare each one with the various detection strings.

Of 64 hotfixes found by the combined methods, the registry scan identified 59, WMI found 62, and MSUpdateService only found 50. The crazy part is that each detection method resulted in finding hotfixes that the other two methods did not.

I don't really want to utilize all 3 methods to get a combined, complete list, but I'm not sure there's a better way. Any thoughts?

Thanks,

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#188366 - 2008-06-25 10:04 PM Re: Reliable method of detecting hotfixes? [Re: Glenn Barnas]
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
I think Jens had a script that did this..

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#188469 - 2008-06-29 02:16 PM Re: Reliable method of detecting hotfixes? [Re: Kdyer]
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
What's so special about the two missing hotfixes? Could they be hotfixes that were replaced by subsequent hotfixes? Have you tried some other tools to see whether they correctly detect those two hotfixes?
_________________________
There are two types of vessels, submarines and targets.

Top
#188470 - 2008-06-29 04:24 PM Re: Reliable method of detecting hotfixes? [Re: Sealeopard]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
I don't think there's anything special about those two hotfixes, it's just that I don't get consistent results between the methods.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#188471 - 2008-06-29 05:13 PM Re: Reliable method of detecting hotfixes? [Re: Glenn Barnas]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
 Originally Posted By: Glenn Barnas
it's just that I don't get consistent results between the methods.
Bugger, isn't it when you're a perfectionist. \:\/
We had an accountant drive us nuts for days because he couldn't balance the books. He was 2 cents off and when my boss threw two pennies at him it just further incensed him.

You would have to examine closely whether the ambiguous hotfixes exist or are superceded and determine why the different detection systems report otherwise. I don't think 100% accuracy is possible across all platforms with one tool.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#188472 - 2008-06-29 05:20 PM Re: Reliable method of detecting hotfixes? [Re: Glenn Barnas]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Literal translation from: http://www.microsoft.com/technet/scriptcenter/guide/sas_cpm_tphw.mspx?mfr=true seems to do the trick.

 Code:
Break on

$strComputer = "."
$objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" + $strComputer + "\root\cimv2")
$colQuickFixes = $objWMIService.ExecQuery("SELECT * FROM Win32_QuickFixEngineering")
For Each $objQuickFix in $colQuickFixes
 ?"Computer: " + $objQuickFix.CSName
 ?"Description: " + $objQuickFix.Description
 ?"Hot Fix ID: " + $objQuickFix.HotFixID
 ?"Installation Date: " + $objQuickFix.InstallDate
 ?"Installed By: " + $objQuickFix.InstalledBy
 Sleep 1
Next


or using the WMI Command line (WMIC) from a command window run:
 Code:
wmic qfe list full /format:htable >C:\hotfixes.htm

http://windowsxp.mvps.org/qfe.htm

Both give me the same results.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#188474 - 2008-06-29 08:08 PM Re: Reliable method of detecting hotfixes? [Re: Mart]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
Well, I'd expect those to give you the same results as they are both using WMI queries to the same source.

My question was why three different methods give 3 different results. Which should be believed? Is it because one is only reporting active and not supersceded hotfixes?

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
Page 1 of 1 1


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 1172 anonymous users online.
Newest Members
StuTheCoder, M_Moore, BeeEm, min_seow, Audio
17884 Registered Users

Generated in 0.061 seconds in which 0.038 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org