2008-09-11 6 views

ответ

2

Использование WMI и осмотрите Win32_QuickFixEngineering перечисление.

От TechNet:

strComputer = "." 
Set objWMIService = GetObject("winmgmts:" _ 
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") 
Set colQuickFixes = objWMIService.ExecQuery _ 
    ("Select * from Win32_QuickFixEngineering") 
For Each objQuickFix in colQuickFixes 
    Wscript.Echo "Computer: " & objQuickFix.CSName 
    Wscript.Echo "Description: " & objQuickFix.Description 
    Wscript.Echo "Hot Fix ID: " & objQuickFix.HotFixID 
    Wscript.Echo "Installation Date: " & objQuickFix.InstallDate 
    Wscript.Echo "Installed By: " & objQuickFix.InstalledBy 
Next 

HotFixID является то, что вы хотите изучить.

Вот результат на моей системе:

 
    Hot Fix ID: KB941569 
    Description: Security Update for Windows XP (KB941569) 
    Hot Fix ID: KB937143-IE7 
    Description: Security Update for Windows Internet Explorer 7 (KB937143) 
    Hot Fix ID: KB938127-IE7 
    Description: Security Update for Windows Internet Explorer 7 (KB938127) 
    Hot Fix ID: KB939653-IE7 
    Description: Security Update for Windows Internet Explorer 7 (KB939653) 
    Hot Fix ID: KB942615-IE7 
    Description: Security Update for Windows Internet Explorer 7 (KB942615) 
    Hot Fix ID: KB944533-IE7 
    Description: Security Update for Windows Internet Explorer 7 (KB944533) 
    Hot Fix ID: KB947864-IE7 
    Description: Hotfix for Windows Internet Explorer 7 (KB947864) 
    Hot Fix ID: KB950759-IE7 
    Description: Security Update for Windows Internet Explorer 7 (KB950759) 
    Hot Fix ID: KB953838-IE7 
    Description: Security Update for Windows Internet Explorer 7 (KB953838) 
    Hot Fix ID: MSCompPackV1 
    Description: Microsoft Compression Client Pack 1.0 for Windows XP 
    Hot Fix ID: KB873339 
    Description: Windows XP Hotfix - KB873339 
    Hot Fix ID: KB885835 
    Description: Windows XP Hotfix - KB885835 
    Hot Fix ID: KB885836 
    Description: Windows XP Hotfix - KB885836 
    Hot Fix ID: KB886185 
    Description: Windows XP Hotfix - KB886185 
    Hot Fix ID: KB887472 
    Description: Windows XP Hotfix - KB887472 
    Hot Fix ID: KB888302 
    Description: Windows XP Hotfix - KB888302 
    Hot Fix ID: KB890046 
    Description: Security Update for Windows XP (KB890046) 
1

Самый надежный способ определить, на какие файлы влияет QFE, и использовать System.Diagnostics.FileVersionInfo.GetVersionInfo(path) для каждого файла и сравнить номера версий.

редактировать: Я думаю, что есть способ, чтобы проверить информацию об удалении в реестре, а также, но если QFE когда-либо становится частью пакета обновления или накопительный пакет, который может сообщить Ложноотрицательные