Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Update > WU history has disappeared - What happened?

Reply
Thread Tools Display Modes

WU history has disappeared - What happened?

 
 
davexnet02
Guest
Posts: n/a

 
      12-05-2004
Hello,
I'm running XP pro SP2.
When I enter the windowsupdate site and select
"view installation history",
a screen appears that says
"You have not installed any updates"

What happened to all the history?

Thanks,
Dave

 
Reply With Quote
 
 
 
 
Torgeir Bakken \(MVP\)
Guest
Posts: n/a

 
      12-06-2004
davexnet02 wrote:

> Hello,
> I'm running XP pro SP2.
> When I enter the windowsupdate site and select
> "view installation history",
> a screen appears that says
> "You have not installed any updates"
>
> What happened to all the history?

Hi

Have you recently deleted the folder
C:\Windows\SoftwareDistribution\DataStore
or files in that folder?

Note that it is not critical to lose the history information, 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=impersonat e}!//" _
& 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/scr...r/default.mspx
 
Reply With Quote
 
Taurarian
Guest
Posts: n/a

 
      12-07-2004
HI Torgeir, handy little script you created. Works like a charm.
Kaylene

"Torgeir Bakken (MVP)" wrote:

> davexnet02 wrote:
>
> > Hello,
> > I'm running XP pro SP2.
> > When I enter the windowsupdate site and select
> > "view installation history",
> > a screen appears that says
> > "You have not installed any updates"
> >
> > What happened to all the history?

> Hi
>
> Have you recently deleted the folder
> C:\Windows\SoftwareDistribution\DataStore
> or files in that folder?
>
> Note that it is not critical to lose the history information, 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=impersonat e}!//" _
> & 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/scr...r/default.mspx
>

 
Reply With Quote
 
Torgeir Bakken \(MVP\)
Guest
Posts: n/a

 
      12-07-2004
Taurarian wrote:

> HI Torgeir, handy little script you created. Works like a charm.
> Kaylene


Thank you for the feedback, Kaylene :-)


--
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/scr...r/default.mspx
 
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
Help--what happened to 6GB? chanook*xyz* Windows Vista General Discussion 11 10-02-2008 12:48 AM
What happened to my MBR? Bernie Windows Vista General Discussion 2 08-01-2006 11:07 AM
How to Clear Update History? How to Clear Single History Update Item That Failed? Susan Windows Update 4 08-13-2004 10:35 PM
Re: can anyone tell me what happened.. zachd [ms] Windows Media Player 9 02-15-2004 02:03 AM



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