作者GodIsland (搞不定吗用C4就对了)
看板EzHotKey
标题[-AI-] 检查HotFix更新是否安装
时间Mon Jun 19 15:20:46 2017
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
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 60.250.204.229
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/EzHotKey/M.1497856850.A.8CA.html
1F:推 yohoboy: 推 ... 07/05 20:00