Determining a Hot Fix's Installation Date

G

Guest

I have located a WSH Script on Microsoft TechNet that is supposed to enumerate installed hot fixes and give the date of installation. I have run the script, but the installation date is blank for every hot fix it finds. I installed a number of hot fixes today via Windows Update, and all are showing up with a blank Installation Date

Here's the code I am using
------------------------------------------
strComputer = ".
Set objWMIService = GetObject("winmgmts:"
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2"
Set colQuickFixes = objWMIService.ExecQuery
("Select * from Win32_QuickFixEngineering"
For Each objQuickFix in colQuickFixe
Wscript.Echo "Computer: " & objQuickFix.CSNam
Wscript.Echo "Description: " & objQuickFix.Descriptio
Wscript.Echo "Hot Fix ID: " & objQuickFix.HotFixI
Wscript.Echo "Installation Date: " & objQuickFix.InstallDat
Wscript.Echo "Installed By: " & objQuickFix.InstalledB
Nex
-------------------------------

Any thoughts on how I can get the installation date to show

Thank you

(Not sure if this is the right place for this question, so if I should post it elsewhere, please let me know!)
 
M

Mark Dormer

The script is valid, I believe the date is unavailable so it can't display
it.
I have never seen a date using this script ever.

Regards
Mark Dormer
 
A

Alex Nichol

Mark said:
The script is valid, I believe the date is unavailable so it can't display
it.
I have never seen a date using this script ever.

You could write something to access the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\WindowscXP\
and its \SP1 \SP2 or \SP3 subkeys. Each fix has a subkey, referenced by
its KB number, under one of those and the data contains InstalledDate
 
G

Guest

Thank you for the information.

Do you know if there is any way to force the installation date to be registered whenever a patch is installed ? It seems weird to have the field out there, but never to make use of it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top