[-AI-] 檢查HotFix更新是否安裝
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://www.ptt.cc/bbs/EzHotKey/M.1497856850.A.8CA.html
推
07/05 20:00, , 1F
07/05 20:00, 1F
EzHotKey 近期熱門文章
PTT數位生活區 即時熱門文章