Sign in with
Sign up | Sign in
Your question

Windows Update - Review your update history question

Last response: in Windows XP
Share
July 2, 2005 3:34:01 PM

Archived from groups: microsoft.public.windowsxp.general (More info?)

I would like to get rid of the "Cancelled" and "Failed" entries in the
Windows Update - Review your update history, because they are finally all
corrected installed.

How can i remove these enries from the history?

Guy
Anonymous
July 2, 2005 7:45:24 PM

Archived from groups: microsoft.public.windowsxp.general (More info?)

1. Does their presence there cause your machine problems? NB: That data is
not on your machine.

2. Is Windows Update or Automatic Update still telling you that some updates
are not installed?
--
~Robear Dyer (PA Bear)
MS MVP-Windows (IE/OE) & Security

Guy wrote:
> I would like to get rid of the "Cancelled" and "Failed" entries in the
> Windows Update - Review your update history, because they are finally all
> corrected installed.
>
> How can i remove these enries from the history?
>
> Guy
July 2, 2005 7:45:25 PM

Archived from groups: microsoft.public.windowsxp.general (More info?)

No all updates are installed, therefore it is much cleanerthat earlier faled
and cancelled entries could be removed from the list.

Guy


"PA Bear" wrote:

> 1. Does their presence there cause your machine problems? NB: That data is
> not on your machine.
>
> 2. Is Windows Update or Automatic Update still telling you that some updates
> are not installed?
> --
> ~Robear Dyer (PA Bear)
> MS MVP-Windows (IE/OE) & Security
>
> Guy wrote:
> > I would like to get rid of the "Cancelled" and "Failed" entries in the
> > Windows Update - Review your update history, because they are finally all
> > corrected installed.
> >
> > How can i remove these enries from the history?
> >
> > Guy
>
>
Related resources
Anonymous
July 3, 2005 2:57:22 AM

Archived from groups: microsoft.public.windowsxp.general (More info?)

Guy wrote:

> I would like to get rid of the "Cancelled" and "Failed" entries in the
> Windows Update - Review your update history, because they are finally all
> corrected installed.
>
> How can i remove these enries from the history?
Hi,

You cannot, the only option is to clear out all the history
information, or nothing.

Using the VBScript below, you can get a report that only contains
the log entries that contains successfully installed updates.

Put the script in a text file with file extension .vbs (e.g.
WU_HistorySuccess.vbs) and run it by double-clicking on it.


'--------------------8<----------------------
' Script that reports only successfully installed updates (that are
' installed with Windows Update v5 or newer technology).
'
' Result will be written to %temp%\UpdateHistorySuccess.txt
' and then launched in Notepad
'
' Author: Torgeir Bakken
' Date 2005-07-02
'
Option Explicit

Const OverwriteIfExist = -1
Const OpenAsASCII = 0

Dim oWU, iTHCount, colUpdate, oUpdate, sStatus, iTotal
Dim iSuccess, iFailed, iAborted, iUnknown, sErrorCode
Dim oFSO, oShell, sFile, f

On Error Resume Next
Set oWU = CreateObject("Microsoft.Update.Searcher")

If Err.Number <> 0 Then
MsgBox "WU programming interface does not exist.", _
vbInformation + vbSystemModal, "Update history"
WScript.Quit
End If
On Error Goto 0

iTHCount = oWU.GetTotalHistoryCount
If iTHCount > 0 Then

Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oShell = CreateObject("Wscript.Shell")
sFile = oShell.ExpandEnvironmentStrings("%TEMP%") _
& "\UpdateHistorySuccess.txt"
Set f = oFSO.CreateTextFile(sFile, _
OverwriteIfExist, OpenAsASCII)

iTotal = 0
iSuccess = 0
iFailed = 0
iAborted = 0
iUnknown = 0

f.WriteLine "Report on successfully installed updates, run at " & Now
f.WriteLine "---------------------------------" _
& "---------------------------------"

Set colUpdate = oWU.QueryHistory(0, iTHCount)

For Each oUpdate In colUpdate

sErrorCode = ""
Select Case oUpdate.ResultCode
Case 2
sStatus = "Succeeded"
iSuccess = iSuccess + 1
f.WriteLine "Title:" & vbTab & vbTab & vbTab & oUpdate.Title
f.WriteLine "Description:" & vbTab & vbTab & oUpdate.Description
f.WriteLine "Date/Time in GMT:" & vbTab & oUpdate.Date
f.WriteLine "Install mechanism:" & vbTab _
& oUpdate.ClientApplicationID
f.WriteLine "---------------------------------" _
& "---------------------------------"

Case 4
sStatus = "Failed"
iFailed = iFailed + 1
sErrorCode = oUpdate.UnmappedResultCode
Case 5
sStatus = "Aborted"
iAborted = iAborted + 1
Case Else
sStatus = "Unknown"
iUnknown = iUnknown + 1
End Select

iTotal = iTotal + 1
Next

f.WriteLine
f.WriteLine "Total number of update log entries found: " & iTotal
f.WriteLine "Number of log entries with status success: " & iSuccess
f.WriteLine "Number of log entries with status failed: " & iFailed _
& " (not shown in list above!)"
f.WriteLine "Number of log entries with status aborted: " & iAborted _
& " (not shown in list above!)"
f.WriteLine "Number of log entries with status unknown: " & iUnknown _
& " (not shown in list above!)"

f.Close
oShell.Run "notepad.exe " & """" & sFile & """", 1, False
Else

MsgBox "No entries found in Update History.", _
vbInformation + vbSystemModal, "Update history"

End If
'--------------------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.m...
Anonymous
July 3, 2005 3:04:08 AM

Archived from groups: microsoft.public.windowsxp.general (More info?)

PA Bear wrote:

> 1. Does their presence there cause your machine problems?
> NB: That data is not on your machine.
Hi,

Actually, if you have the Windows Update v5 or newer client component
installed, the data is on your machine.

It is stored in the database file
C:\Windows\SoftwareDistribution\DataStore\DataStore.edb

In the link below is a VBScript that outputs all the installation
history to a text file.

"View Installation History" for WU5 without using the WU Web site
http://groups.google.co.uk/group/microsoft.public.windo...



--
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.m...
July 3, 2005 5:36:05 AM

Archived from groups: microsoft.public.windowsxp.general (More info?)

hi,
thx for the answer.
i suppose it isn't a good idea to clear out all history information?
what are the consequences of this and how can one clear out all this
information?

Guy


"Torgeir Bakken (MVP)" wrote:

> Guy wrote:
>
> > I would like to get rid of the "Cancelled" and "Failed" entries in the
> > Windows Update - Review your update history, because they are finally all
> > corrected installed.
> >
> > How can i remove these enries from the history?
> Hi,
>
> You cannot, the only option is to clear out all the history
> information, or nothing.
>
> Using the VBScript below, you can get a report that only contains
> the log entries that contains successfully installed updates.
>
> Put the script in a text file with file extension .vbs (e.g.
> WU_HistorySuccess.vbs) and run it by double-clicking on it.
>
>
> '--------------------8<----------------------
> ' Script that reports only successfully installed updates (that are
> ' installed with Windows Update v5 or newer technology).
> '
> ' Result will be written to %temp%\UpdateHistorySuccess.txt
> ' and then launched in Notepad
> '
> ' Author: Torgeir Bakken
> ' Date 2005-07-02
> '
> Option Explicit
>
> Const OverwriteIfExist = -1
> Const OpenAsASCII = 0
>
> Dim oWU, iTHCount, colUpdate, oUpdate, sStatus, iTotal
> Dim iSuccess, iFailed, iAborted, iUnknown, sErrorCode
> Dim oFSO, oShell, sFile, f
>
> On Error Resume Next
> Set oWU = CreateObject("Microsoft.Update.Searcher")
>
> If Err.Number <> 0 Then
> MsgBox "WU programming interface does not exist.", _
> vbInformation + vbSystemModal, "Update history"
> WScript.Quit
> End If
> On Error Goto 0
>
> iTHCount = oWU.GetTotalHistoryCount
> If iTHCount > 0 Then
>
> Set oFSO = CreateObject("Scripting.FileSystemObject")
> Set oShell = CreateObject("Wscript.Shell")
> sFile = oShell.ExpandEnvironmentStrings("%TEMP%") _
> & "\UpdateHistorySuccess.txt"
> Set f = oFSO.CreateTextFile(sFile, _
> OverwriteIfExist, OpenAsASCII)
>
> iTotal = 0
> iSuccess = 0
> iFailed = 0
> iAborted = 0
> iUnknown = 0
>
> f.WriteLine "Report on successfully installed updates, run at " & Now
> f.WriteLine "---------------------------------" _
> & "---------------------------------"
>
> Set colUpdate = oWU.QueryHistory(0, iTHCount)
>
> For Each oUpdate In colUpdate
>
> sErrorCode = ""
> Select Case oUpdate.ResultCode
> Case 2
> sStatus = "Succeeded"
> iSuccess = iSuccess + 1
> f.WriteLine "Title:" & vbTab & vbTab & vbTab & oUpdate.Title
> f.WriteLine "Description:" & vbTab & vbTab & oUpdate.Description
> f.WriteLine "Date/Time in GMT:" & vbTab & oUpdate.Date
> f.WriteLine "Install mechanism:" & vbTab _
> & oUpdate.ClientApplicationID
> f.WriteLine "---------------------------------" _
> & "---------------------------------"
>
> Case 4
> sStatus = "Failed"
> iFailed = iFailed + 1
> sErrorCode = oUpdate.UnmappedResultCode
> Case 5
> sStatus = "Aborted"
> iAborted = iAborted + 1
> Case Else
> sStatus = "Unknown"
> iUnknown = iUnknown + 1
> End Select
>
> iTotal = iTotal + 1
> Next
>
> f.WriteLine
> f.WriteLine "Total number of update log entries found: " & iTotal
> f.WriteLine "Number of log entries with status success: " & iSuccess
> f.WriteLine "Number of log entries with status failed: " & iFailed _
> & " (not shown in list above!)"
> f.WriteLine "Number of log entries with status aborted: " & iAborted _
> & " (not shown in list above!)"
> f.WriteLine "Number of log entries with status unknown: " & iUnknown _
> & " (not shown in list above!)"
>
> f.Close
> oShell.Run "notepad.exe " & """" & sFile & """", 1, False
> Else
>
> MsgBox "No entries found in Update History.", _
> vbInformation + vbSystemModal, "Update history"
>
> End If
> '--------------------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.m...
>
Anonymous
July 3, 2005 9:17:31 PM

Archived from groups: microsoft.public.windowsxp.general (More info?)

Guy wrote:

> hi,
> thx for the answer.
> i suppose it isn't a good idea to clear out all history
> information? what are the consequences of this and how can
> one clear out all this information?
Hi,

The only consequence is that you have no more old update history to
look at.

To clear the history, you can delete the folder
%windir%\SoftwareDistribution\DataStore\

(%windir% is typically C:\Windows or C:\Winnt)

Note that you will need to stop the "Automatic Updates" service before
you are allowed to delete this folder, e.g by doing the following:

Start/Run --> services.msc

Then find "Automatic Updates" in the list, and double click on it.

If the service status is "Started", press the Stop button.

You can now delete the DataStore folder.




--
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.m...
!