View Single Post
Old 02-28-2008   #6 (permalink)
Mark L. Ferguson


 
 

Re: Check for installed updates programmatically

"cscript get update history.vbs"

--Get update history.vbs--
Set objSession = CreateObject("Microsoft.Update.Session")
Set objSearcher = objSession.CreateUpdateSearcher
intHistoryCount = objSearcher.GetTotalHistoryCount

Set colHistory = objSearcher.QueryHistory(1, intHistoryCount)

For Each objEntry in colHistory
Wscript.Echo "Operation: " & objEntry.Operation
Wscript.Echo "Result code: " & objEntry.ResultCode
Wscript.Echo "Exception: " & objEntry.Exception
Wscript.Echo "Date: " & objEntry.Date
Wscript.Echo "Title: " & objEntry.Title
Wscript.Echo "Description: " & objEntry.Description
Wscript.Echo "Unmapped exception: " & objEntry.UnmappedException
Wscript.Echo "Client application ID: " & objEntry.ClientApplicationID
Wscript.Echo "Server selection: " & objEntry.ServerSelection
Wscript.Echo "Service ID: " & objEntry.ServiceID
i = 1
For Each strStep in objEntry.UninstallationSteps
Wscript.Echo i & " -- " & strStep
i = i + 1
Next
Wscript.Echo "Uninstallation notes: " & objEntry.UninstallationNotes
Wscript.Echo "Support URL: " & objEntry.SupportURL
Wscript.Echo
Next
--end file--
--
Was this helpful? Then click the "Yes" Ratings button. Voting helps the web
interface.
http://www.microsoft.com/wn3/locales....htm#RateAPost

Mark L. Ferguson

..
"om" <omagen@xxxxxx> wrote in message
news:54438995-f84f-4dd0-90f1-1b58045db822@xxxxxx
Quote:

> On Feb 28, 12:10 pm, om <oma...@xxxxxx> wrote:
Quote:

>> Hello.
>> Is there a good way of finding out if a HotFix update is installed on
>> a user's machine?
>>
>> I need to know on install time if this hot fix is installed or not. I
>> know the hotfix appears in the Add Remove Programs , and therefore i
>> assumed there's a registry entry for it. It seems like its not as easy
>> as i hoped: I found it under:
>>
>> [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion
>> \Component Based Servicing\PackageDetect\Microsoft-Windows-Foundation-
>> Package~31bf3856ad364e35~x86~~0.0.0.0]
>>
>> But to enumerate that key for the specific hotfix that i'm looking for
>> seems like not the right approach.
>>
>> Any ideas?
>
> I am using wusa.exe to run this hotfix on machines that need it - i
> just cant find enough documentation about the return codes from
> wusa.exe. Maybe there is a return code saying "already installed" or
> something in that nature.
My System SpecsSystem Spec