Re: Cannot View My Windows Update Installation History

From: Taurarian (taurarianREMOVECAPS_at_hotmail.com)
Date: 12/29/04


Date: Wed, 29 Dec 2004 19:02:30 +1100

By renaming the softwareDistribution folder, you have lost your WUv5 History – not
important.

Courtesty of: torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway

"Windows Update does not use this to determine what updates should be offered
to you.

The VBScript below will list updates installed regardless of the WU history, and if
data exists, also the description, the user that installed it and installation date.

The updates listing is obtained through the WMI class
Win32_QuickFixEngineering.

Put it in a text file and save it as e.g. ListHotfixes.vbs, run the script like this:

wscript.exe "C:\Scripts\ListHotfixes.vbs"

(assuming you have put the script in the folder C:\Scripts\)

The VBScript will give this type of output:

------------------------------------------

Hotfix report date: 2004-10-19 18:01:19

OS version: Microsoft Windows XP Professional
SP version: Service Pack 2
OS language: English

Hotfixes Identified:

HotFixID: Q282784
Description: Windows XP Hotfix (SP1) [See Q282784 for more information]
InstalledBy:
InstallDate: (none found)

HotFixID: Q282784
Description: Windows XP Hotfix (SP1) [See Q282784 for more information]
InstalledBy: a117296
InstallDate: 10/18/2004

....

------------------------------------------

Script start:

'--------------------8<----------------------
'
' Description: Script that outputs some computer information
' and lists all installed hotfixes including installation date
'
' Author: Torgeir Bakken
' Date: 2004-10-19
'

Const OpenAsASCII = 0
Const OverwriteIfExist = -1

Set oShell = CreateObject("WScript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")

sFile = oFSO.GetSpecialFolder(2).ShortPath & "\updates.txt"
Set fFile = oFSO.CreateTextFile(sFile, OverwriteIfExist, OpenAsASCII)

fFile.WriteLine
fFile.WriteLine "Hotfix report date: " & Now & vbCrLf

strComputer = "." ' use "." for local computer

Const HKLM = &H80000002

'On Error Resume Next
Set objWMIService = GetObject("winmgmts:" _
         & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colSettings = objWMIService.ExecQuery _
         ("Select * from Win32_OperatingSystem")

' get general info about the OS

' Caption value for different OS:
' Microsoft Windows 2000 ...
' Microsoft Windows XP ...
' Microsoft(R) Windows(R) Server 2003, ..... Edition
For Each objOperatingSystem in colSettings
     strOSCaption = objOperatingSystem.Caption
     Select Case True
       Case InStr(1, strOSCaption, "windows 2000", vbTextCompare) > 0
         strOS = "Windows 2000"
       Case InStr(1, strOSCaption, "windows xp", vbTextCompare) > 0
         strOS = "Windows XP"
       Case InStr(1, strOSCaption, "windows(r) server 2003", vbTextCompare) > 0
         strOS = "Windows Server 2003"
     End Select

     intOSLang = objOperatingSystem.OSLanguage
     strOSLangHex = Right("000" & Hex(intOSLang), 4)
     strOSServicePack = objOperatingSystem.CSDVersion
Next

Set objReg = GetObject("WinMgmts:{impersonationLevel=impersonate}!//" _
               & strComputer & "/root/default:StdRegProv")

strOSLanguage = "Unknown" ' Init value
strKeyPath = "SOFTWARE\Classes\MIME\Database\Rfc1766"
strValueName = strOSLangHex
objReg.GetStringValue HKLM, strKeyPath, strValueName, strOSLanguage

' remove unnecessary stuff
arrOSLanguage = Split(strOSLanguage, ";")
strOSLanguage = arrOSLanguage(UBound(arrOSLanguage))
If Instr(strOSLanguage, "(") > 0 Then
     arrOSLanguage = Split(strOSLanguage, "(")
     strOSLanguage = Trim(arrOSLanguage(0))
End If

fFile.WriteLine "OS version: " & strOSCaption
fFile.WriteLine "SP version: " & strOSServicePack
fFile.WriteLine "OS language: " & strOSLanguage

' start enumeration of hotfixes

fFile.WriteLine vbCrLf & "Hotfixes Identified:" & vbCrLf

strRegBaseUpdate = "SOFTWARE\Microsoft\Updates\" & strOS

Set colItems = objWMIService.ExecQuery _
         ("Select * from Win32_QuickFixEngineering",,48)

For Each objItem in colItems
     If objItem.HotFixID <> "File 1" Then
        fFile.WriteLine "HotFixID: " & objItem.HotFixID
        fFile.WriteLine "Description: " & objItem.Description
        fFile.WriteLine "InstalledBy: " & objItem.InstalledBy
        strInstallDate = Null ' init value
        If objItem.ServicePackInEffect <> "" Then
           strRegKey = strRegBaseUpdate & "\" & objItem.ServicePackInEffect _
                  & "\" & objItem.HotFixID
           objReg.GetStringValue HKLM, strRegKey, _
                "InstalledDate", strInstallDate
        End If

        If IsNull(strInstallDate) Then
           strInstallDate = "(none found)"
        End If
        fFile.WriteLine "InstallDate: " & strInstallDate
        fFile.WriteLine ' blank line
     End If
Next

fFile.Close
oShell.Run sFile

'--------------------8<----------------------

-- 
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx
"shalen" <shalen@discussions.microsoft.com> wrote in message 
news:D2569605-DB6D-4C40-8A71-3D2A66F3C606@microsoft.com...
> When I try to view my installation history at the Windows Update site, I get
> the following message:
>
> "You have not installed any updates."
>
> This is not true.  I have installed many updates over the years on my XP
> machine and have viewed them many times also.
>
> A thing that happened to me today was that I got an error while trying to
> access the Windows Update site.  To fix this, I was instructed to rename my
> C:\windows\SoftwareDistribution folder to SoftwareDistribution.old, turn off
> the Windows Update service and then turn it back on to rebulid my
> SoftwareDistribution folder.  This worked in fixing the access problem but
> now I can't view my installation history.  I have found nothing in the
> Microsoft knowledge base to fix this.
>
> Thank you
> 


Relevant Pages

  • Re: Creating a Update CD for Distro
    ... >> to my offline users that includes Windows Updates, ... > better informed about your options when it comes to the Windows Updates. ... > Creating an Integrated Installation ... > understand and utilize good passwords. ...
    (microsoft.public.windowsupdate)
  • Re: Attacked by Spyware and Adware
    ... involve installing a service pack again first and then all critical updates. ... your backed up data media before copying to your new installation. ... Windows 2000 and Windows XP: ... back in or dial out to the Internet and you must download and install the MS04-011 ...
    (microsoft.public.win2000.security)
  • Re: Updates since SP3 on XP
    ... except for Defender def updates and occasionally one or two others ... flavor of Windows XP you have. ... You either have a pre-release version of SP3 installed or a failed ... Pack 3 for Windows XP installation. ...
    (microsoft.public.windowsupdate)
  • RE: slow start-up following latest updates windows xp
    ... After the latest set of window security updates, ... seconds before I can run a program from booting up windows. ... With the recent installation of updates/patches from aug 8, ... the limited user account or the admin account), ...
    (microsoft.public.windowsxp.perform_maintain)
  • Damn KB890830!!! Arrrrggggghhh.
    ... Case A: HP Pavilion m7590n. ... Originally shipped with Windows MCE 2005 SP2; ... and installed each of 9 updates one ... as the installation progress bar was ...
    (microsoft.public.windowsupdate)