作者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/m.aspx?n=bbs/EzHotKey/M.1497856850.A.8CA.html
1F:推 yohoboy: 推 ... 07/05 20:00