Link to home
Start Free TrialLog in
Avatar of schmuck2
schmuck2

asked on

Windows Update - how to get date last ran

I need to extract the date that Windows Update was last run on a PC running Windows 98se

if this is not possible then how do I tell if a particular update (eg. KB896727) has been installed?

I'm using Visual Basic 5.0 but posted in this area in case it's an api I can easily use in VB

thanks
Avatar of graye
graye
Flag of United States of America image

Presence or absence of a particular update is not too difficult to find...  Although in Win98 the location in the registry for updates tends to change depedning on the age of the update!  The older updates tend to be in one location, and the newer ones in another.  To make sense of this madness, I check all three posible locations in the registry (knowing full well, that some locations won't exist or have no entries).

HKLM\SOFTWARE\Microsoft\Updates  <- the modern location
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Updates <- The Win9x location
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix <- the WinNT location

However, the rest of your question is gonna be kinda tough for Win98.  Starting with Win2k, the individual updates recorded their install date.  For anything less than Win2k, the use of the install date is very sporatic.  In my experience with WinNT, less than 1/4 of the "QFE" entries had install dates.  I have no realy experience with Win98, but I'd assume it'd be the same or worse.

The registry settings (for modern OS's) contains the value for the "Next Run"... not the date of the "Last Run".

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update, the key is NextDetectionTime
Avatar of schmuck2
schmuck2

ASKER

thanks for your help

I have found the solution

Windows Update writes all activity (dates, patch installed etc) to a logfile in the Windows/WinNT folder.

I simply get the filedate of this file for when WU last ran

For Win98 it is Windows Update.log (space)
For Win2K/WinXP it is WindowsUpdate.log (no space)
ASKER CERTIFIED SOLUTION
Avatar of DarthMod
DarthMod
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial