![code on time error in windows 10 code on time error in windows 10](https://www.get-itsolutions.com/wp-content/uploads/2020/10/03.Internet-time-Error-0x80070002-windows-10.jpg)
'Is a currently installed update, so check its date If UpdateList(i).ResultCode >= orcSucceeded Then 'below (marked with "***") and then run this routine under Windows 10. 'To demonstrate the Windows-10 bug, comment out the "On Error Resume Next" line in the GetUpdateInfo function, 'Prints the date and title of the latest updates to the Immediate window. Public Sub Demo_IUpdateHistoryEntry_Bug() 'see the B_GenUtils module's function DateTimeUtcToLocal or Chip Pearson's 'NOTE: For early binding, requires that the "WUAPI X.Y Type Library" reference be set.ĭateTime_UTC As Date 'UTC = "Coordinated Universal Time" (formerly GMT).
![code on time error in windows 10 code on time error in windows 10](https://cdn.windowsreport.com/wp-content/uploads/2020/09/green-screen-of-death-1.jpg)
Just run the Demo_IUpdateHistoryEntry_Bug routine: Option Explicit Here's a demonstration version of my code. Does that error actually mean anything? If so, what is it telling me and how do I fix whatever is causing it, without just suppressing and ignoring "Run-time error '-2145120257 (80240fff)': Method 'ResultCode' of object 'IUpdateHistoryEntry2' failed"Ĭuriously, it does actually return the correct value (2 = Succeeded) in spite of the error condition. In W-10, when I access the ResultCode property of the IUpdateHistoryEntry object, This code works fine in all Windows version prior to Windows 10.
CODE ON TIME ERROR IN WINDOWS 10 UPDATE
I have written VBA code for Excel and Word that accesses the Windows update history via the WUAPI.