Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > Check for installed updates programmatically

Reply
Thread Tools Display Modes

Check for installed updates programmatically

 
 
om
Guest
Posts: n/a

 
      02-28-2008
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\Curr entVersion
\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?
 
Reply With Quote
 
 
 
 
Bob F.
Guest
Posts: n/a

 
      02-28-2008
"om" <> wrote in message
news:27cfd5c7-be6d-47d6-ac4e-...
> 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\Curr entVersion
> \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?



Go to Control Panel > Windows Update > View Update History and check for
your updates. Hotfixes are included if you did any.
--
BobF.
Lincoln actually got it right but was way ahead of his time when he said,
"You can have some of you computer working all of the time and all of your
computer working some of the time but..." It was he that said that, wasn't
it?

 
Reply With Quote
 
om
Guest
Posts: n/a

 
      02-28-2008
On Feb 28, 12:10 pm, om <oma...@gmail.com> wrote:
> 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\Curr entVersion
> \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.
 
Reply With Quote
 
Mark L. Ferguson
Guest
Posts: n/a

 
      02-28-2008
systeminfo > list.txt
find "123456" list.txt

--
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" <> wrote in message
news:54438995-f84f-4dd0-90f1-...
> On Feb 28, 12:10 pm, om <oma...@gmail.com> wrote:
>> 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\Curr entVersion
>> \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.


 
Reply With Quote
 
om
Guest
Posts: n/a

 
      02-28-2008
On Feb 28, 12:19 pm, "Bob F." <b...@furtawNOSPAN.com> wrote:
> "om" <oma...@gmail.com> wrote in message
>
> news:27cfd5c7-be6d-47d6-ac4e-...
>
>
>
> > 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\Curr entVersion
> > \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?

>
> Go to Control Panel > Windows Update > View Update History and check for
> your updates. Hotfixes are included if you did any.
> --
> BobF.
> Lincoln actually got it right but was way ahead of his time when he said,
> "You can have some of you computer working all of the time and all of your
> computer working some of the time but..." It was he that said that, wasn't
> it?


Bob, thank you - I'm aware of that, but i need this programmatically.
 
Reply With Quote
 
Mark L. Ferguson
Guest
Posts: n/a

 
      02-28-2008
"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" <> wrote in message
news:54438995-f84f-4dd0-90f1-...
> On Feb 28, 12:10 pm, om <oma...@gmail.com> wrote:
>> 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\Curr entVersion
>> \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.


 
Reply With Quote
 
Joe Morris
Guest
Posts: n/a

 
      02-29-2008
"om" <> wrote:
> "Bob F." <b...@furtawNOSPAN.com> wrote:
>> "om" <oma...@gmail.com> wrote in message


>> > Is there a good way of finding out if a HotFix update is installed on
>> > a user's machine?

[...]

>> Go to Control Panel > Windows Update > View Update History and check for
>> your updates. Hotfixes are included if you did any.


> Bob, thank you - I'm aware of that, but i need this programmatically.


It's a bit indirect but depending on how you're writing the process that
needs this information, you can use WMIC. If the correct form of the hotfix
name is KB123456, the command:

WMIC QFE WHERE HOTFIXID='KB123456'

will produce a zero-length SYSERR output if KB123456 is present. If
KB123456 is not present, the command will produce a 6-byte SYSOUT string.

This is a hack; if you're using wscript the code suggested by Mark Ferguson
elsewhere in the thread would be a better choice...or consider using
PowerShell if you can assume that it's installed on the systems on which
your program will run.

Joe Morris


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Can't Check for Updates kberty Windows Vista General Discussion 2 04-12-2008 04:46 AM
Windows can't check for updates AuburnShark Windows Vista Performance 0 02-29-2008 08:19 PM
unable to check for updates LaDonna Windows Vista Performance 0 01-27-2008 07:55 PM
Windows can't check for updates... Jerz Windows Vista General Discussion 3 06-24-2006 02:26 AM
Check for installed Defender on XP should be earlier JPS Windows Vista Installation 0 06-17-2006 09:28 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59