https://www.autoitscript.com/forum/topic/114824-how-to-determine-which-
hotfix-i-have/#comment-803770
使用时,将 $search = "kb943232" 这里修改成要查询的更新即可
Global $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\"
& @ComputerName & "\root\cimv2")
Global $colItems = $objWMIService.ExecQuery("SELECT HotFixID from
Win32_QuickFixEngineering", "WQL", 0x30)
Global $HF_KB
If IsObj($colItems) Then
For $objItem In $colItems
If StringLeft($objItem.HotFixID, 1) <> "{" Then $HF_KB &=
$objItem.HotFixID & " "
Next
EndIf
$search = "KB943232"
If StringInStr($HF_KB, $search) > 0 Then
ConsoleWrite("Hotfix " & $search & " is installed!" & @CRLF)
Else
ConsoleWrite("Hotfix " & $search & " is NOT installed!" & @CRLF)
EndIf