I have this report which shows me any machine that is missing the patch for XP KB2621440. I have isolated the ones that need updates applied.
Select Top (1000000) tblComputers.Computername, tblComputers.ComputerUnique, tblComputers.Domain, Web40OSName.OSname, TsysLastscan.Lasttime As Lastscanned, Web40OSName.Compimage As icon From tblComputers Inner Join TsysLastscan On tblComputers.Computername = TsysLastscan.Computername Left Outer Join tblOperatingsystem On tblComputers.Computername = tblOperatingsystem.Computername Inner Join web40ActiveComputers On tblComputers.Computername = web40ActiveComputers.Computername Inner Join Web40OSName On Web40OSName.Computername = tblComputers.Computername Where tblComputers.Computername Not In (Select tblQuickFixEngineering.Computername From tblQuickFixEngineering Where tblQuickFixEngineering.HotFixID = 'KB2621440') And TsysLastscan.CFGcode = 49 And Cast(Left(tblOperatingsystem.Version, 3) As Decimal(3,1)) < 6.1 Order By tblComputers.Computer
There is a KB for Windows 7 machines that is KB2667402.
When I simply change:
tblQuickFixEngineering.HotFixID = 'KB2621440')
to
tblQuickFixEngineering.HotFixID = 'KB2667402')
I get a bunch of XP machines. I'm thinking it has to do with something in this region of the query:
TsysLastscan.CFGcode = 49 And Cast(Left(tblOperatingsystem.Version, 3) As Decimal(3,1)) < 6.1
Is there a value to distinguish Windows 7 and greater?
The KBs I'm searching for come from this link:
http://technet.microsoft.com/en-us/security/bulletin/ms12-020