Remove update history

A

ADKR

control panel/system and maintenance/windows update/view update history

I have a number of failed updates for various reasons. I would like to
delete them and leave the list of successful updates. Is this possible?
Thanks.
 
S

SG

Hi,

Mark's way works, but I had to run the command prompt a Administrator.

For more information on what was successful and which failed along with a
description of each. Open Notepad and Copy/Paste the following...
Save/As Updates.vbs Credit goes to Author: Torgeir Bakken for this
script.

Start Copy Below
========================================


' Script that reports installed updates that are
' installed with Windows Update v5 technology
'
' Result will be written to %temp%\UpdateHistory.txt
' and then launched in Notepad
'
' Author: Torgeir Bakken
' Date 2004-08-12
'
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 "WU5 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%") & "\UpdateHistory.txt"
Set f = oFSO.CreateTextFile(sFile, _
OverwriteIfExist, OpenAsASCII)


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


f.WriteLine "Report run at " & Now
f.WriteLine "---------------------------------" _
& "---------------------------------"


Set colUpdate = oWU.QueryHistory(0, iTHCount)


For Each oUpdate In colUpdate
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


sErrorCode = ""
Select Case oUpdate.ResultCode
Case 2
sStatus = "Succeeded"
iSuccess = iSuccess + 1
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


If sStatus = "Failed" Then
f.WriteLine "Install error:" & vbTab & vbTab & sErrorCode
End If


f.WriteLine "Install status:" & vbTab & vbTab & sStatus
f.WriteLine "---------------------------------" _
& "---------------------------------"


iTotal = iTotal + 1
Next


f.WriteLine
f.WriteLine "Total number of updates found: " & iTotal
f.WriteLine "Number of updates succeeded: " & iSuccess
f.WriteLine "Number of updates failed: " & iFailed
f.WriteLine "Number of updates aborted: " & iAborted


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


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


End If


=======================================
End Copy Above

--
All the best,
SG

ALEX NICHOL
(1935-2005)
http://www.aumha.org/alex.htm
You will never be forgotten my friend
 
G

Guest

"ADKR" wrote in message
control panel/system and maintenance/windows update/view update history

I have a number of failed updates for various reasons. I would like to
delete them and leave the list of successful updates. Is this possible?
Thanks.


You want to look here...

Control Panel > Programs > Programs and Features > View Installed Updates
 
A

ADKR

Thanks everyone for taking a shot at this. My issue, deleting failed updates
from the list described below looks like a bust. I don't want to
uninstall/view/whatever. I just want to delete the list/notifications/titles
of failed installs. It isn't earth shaking, just an annoyance.
 

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

Similar Threads

.NET Framework 1.1 1
Help with repeating updates 3
Windows Update - now "History" is messed up 4
Updates fail 4
Update Failures 2
Manual Update Download 3
Updates history 1
Unknown Error installing KB972581 3

Top