全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:2490
推到 Plurk!
推到 Facebook!

請問如何正確得到已經安裝過的WINDOWS UPDATE紀錄?

答題得分者是:Fishman
cmfbiceo
一般會員


發表:3
回覆:2
積分:1
註冊:2004-03-24

發送簡訊給我
#1 引用回覆 回覆 發表時間:2007-02-16 01:01:38 IP:59.104.xxx.xxx 訂閱
最近想寫個自動安裝WINDOWS UPDATE的程式,目前卡在不知道怎麼取得已經安裝過的清單,請問有人曾經解決過這個問題嗎?

Fishman
尊榮會員


發表:120
回覆:1949
積分:2163
註冊:2006-10-28

發送簡訊給我
#2 引用回覆 回覆 發表時間:2007-02-16 15:35:29 IP:59.124.xxx.xxx 未訂閱
參考一下:
http://www.programmer-club.com/pc2020v5/forum/ShowSameTitleN.asp?URL=N&board_pc2020=win2kpro&id=522
http://www.vbaexpress.com/kb/getarticle.php?kb_id=806
http://www.microsoft.com/technet/community/columns/scripts/default.mspx
<textarea class="vb" rows="10" cols="60" name="code">Set objSession = CreateObject("Microsoft.Update.Session") Set objSearcher = objSession.CreateUpdateSearcher intHistoryCount = objSearcher.GetTotalHistoryCount Set colHistory = objSearcher.QueryHistory(0, intHistoryCount) For Each objEntry in colHistory Wscript.Echo "Title: " & objEntry.Title Wscript.Echo "Description: " & objEntry.Description Wscript.Echo "Update application date: " & objEntry.Date Select Case objEntry.Operation Case 1 Wscript.Echo "Operation type: Installation" Case 2 Wscript.Echo "Operation type: Uninstallation" Case Else Wscript.Echo "The operation type could not be determined." End Select Select Case objEntry.ResultCode Case 0 Wscript.Echo "Operation result: The operation has not started." Case 1 Wscript.Echo "Operation result: The operation is in progress." Case 2 Wscript.Echo "Operation result: The operation completed successfully." Case 3 Wscript.Echo "Operation result: The operation completed, but one or more errors occurred " & _ "during the operation and the results are potentially incomplete." Case 4 Wscript.Echo "Operation result: The operation failed to complete." Case 5 Wscript.Echo "Operation result: The operation was aborted." Case Else Wscript.Echo "The operation result could not be determined." End Select Set objIdentity = objEntry.UpdateIdentity Wscript.Echo "Update ID: " & objIdentity.UpdateID Wscript.Echo Next </textarea><br />
Fishman
------
Fishman
系統時間:2024-04-19 21:04:46
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!