Kaseya Community

Manage Windows updates via Kaseya Policy. Dates not updating in Windows Update GUI.

  • We have a number of policies for clients managing Windows updates. Updates are installing no problem. The issue is that when a user goes to check for updates, the dates for "Most recent check for updates" and "Updates were installed" do no reflect the last time updates were installed via Kaseya. Clients will check this kind of thing to make sure a service they pay for is actually doing its job. We can tell them to go to appwiz.cpl and view the installed updates, sort by date, and see the updates are installing, but it would be nice if they didn't have to ask this question at all.

    It was my understanding that the Kaseya agent leverages the Windows Update Agent to install the approved updates. (https://community.kaseya.com/kb/w/wiki/948.aspx). So why does that date not change? Is there a way in Kaseya to force that date to update as Kaseya pushes Windows updates?

    grammar fixes
    [edited by: jimmyc at 8:40 AM (GMT -8) on Feb 4, 2014]
  • I haven't tested this yet, but you can try this:

    After you run your patch install schedule a procedure to run that will change the following registry keys:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Detect\LastSuccessTime <YYYY-MM-DD HH:MM:SS>

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Install\LastSuccessTime <YYYY-MM-DD HH:MM:SS>

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Download\LastSuccessTime <YYYY-MM-DD HH:MM:SS>

    Then reboot the machine or restart the windows update services. This will change the value you are looking to change. You can take it a step further and also change the key:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Install\LastError to be "0"

    [edited by: Matt S. at 9:00 AM (GMT -8) on Feb 4, 2014]
  • Awesome thanks! I was looking for reg entries. You're google-fu is strong. I would also like to hear someone from support weigh in on this. Maybe I need to make a feature request.

    add request for support to respond.
    [edited by: jimmyc at 9:03 AM (GMT -8) on Feb 4, 2014]
  • Procedure Change Windows Update Timestamp.xml

    , I have gone ahead and uploaded a procedure I created to do what i mentioned before. Download it and give it a whirl. It works for me on my windows 7 machine. 

  • Thanks much - this is exactly what I needed.  However, after running the procedure, the time shown on the Windows Update GUI is 4 hours off.  For example, I ran Kaseya Patch Management at 11:57 am, but the GUI shows 7:57 am.  I rebooted, checked the appropriate dates in the registry and in the datetime.bat and they are correct...11:57 am.  Any idea how to fix this?

  • This is great! Plan to execute this after updates complete for Win 7/8 machines.

    Also having the above mentioned issue with the time being 4 hours off. Registry date/ time is correct but it still appears 4 hours off.

    If there is a fix for this that would be nice.

  • Hi Mikey

    Have you checked the settings in System->Preferences to confirm the time zone offset is set correctly?

    Select time zone offset

    Use time zone of the browser logging into the system

    Use time zone of the VSA server.     Current VSA Browser time: 11:08:11 am 24-Apr-14

    Use fixed offset from the VSA server   hours

  • Currently set to: Use time zone of the browser logging into the system

  • And is that consistent with the time zone the server is in that you're see the discrepancy on?

  • Yes, I ran it against my own machine.

  • Windows Update is expecting the time to be in UTC. For example, if you are in the Pacific time zone and observe daylight savings time, you would need to add 7 hours to the time you write in the registry.

  • Alternatively, we could use WMIC to get the hour in UTC:

    wmic path Win32_UTCTime get Hour

  • Procedure Windows Update Timestamp.xml

    Here is what I ended up with. I'm thinking there is probably a smoother way to accomplish this, but for now at least this works.

  • SMason this is great. Thank you for finding a solution to this.

  • Procedure Windows Update Timestamp.xml

    Sort of bringing up an old thread here, but this should definitely be something that Kaseya adds. On Windows 8.1 machines I started getting "Windows update needs your help" notifications, stating that Windows was unable to check for updates in the last 30 days. This is because Kaseya is managing updates and is not updating the agent's "Windows Update" last scan or install time as it should be when it deploys updates.

    I looked at the above script and I've created my own that's a bit different as it updates the date/time with the actual values pulled from Kaseya.

    To do this, there's two variables:

    #vPatchStatusByAgent.lastPatchScan# - Date/time the last patch scan occurred

    #vPatchStatusByAgent.lastAutomaticUpdate# - Date/time automatic update last occurred (updates were installed)

    Therefore, the script uses those above variables from Kaseya, then it runs two quick powershell commands to convert those time variables to UTC, and then it updates the registry. I've scheduled this to run as a automatic update "post-procedure", and right after machines are patch scanned.