1. Dustin Hatch
  2. PsychicRobot
  3. Issues
Issue #5 open

When an update fails, it halts execution of updates.

Scott Smerchek
created an issue

While performing updates using the following sequence:



Import-Module WindowsUpdates Get-WindowsUpdate -Verbose | Set-WindowsUpdate -AcceptEula -Verbose -PassThru | Install-WindowsUpdate -Reboot -Verbose }}}

The script successfully downloaded 20 updates and started installing. At 6 of 20 updates the script seemed to have hung, then a Windows Update pop-up showed up telling me to restart. It seems that one of the updates required a restart, although I cannot be sure which one.

After the restart, I ran the script again and 14 updates were successfully installed.

Comments (8)

  1. Dustin Hatch repo owner

    Thanks for the log file. I am going over it now to see if I can track down what might have caused the issue you reported.

    Can you please help me understand exactly what transpired in your situation? How long did the PowerShell session appear to hang before you noticed something was wrong (seconds?, minutes?)? When you realized it wasn't working, what did you do? When Windows Update prompted you to reboot the computer, was the PowerShell pipeline still running? Did you stop the PowerShell session before rebooting the computer? How did you initiate the reboot; did you click "Reboot Now" in the Windows Update prompt?

    I am trying to identify a particular message in the log file, on line 15945:

    2012-06-25	17:13:10:688	3036	12f8	Handler	CUHCbsHandler::Cancel called with fReleaseThreadNow=0

    and this related one on line 15958:

    2012-06-25	17:13:16:845	 196	bcc	Report	REPORT EVENT: {FFEF602B-1E43-46A0-8002-A8DCBFFB1351}	2012-06-25 17:13:11:844-0400	1	186	101	{16E9C62D-05B2-4E14-BFB0-CF55EDBD4F61}	106	8024000b		Success	Content Install	User cancelled the installation.

    These seem to correlate with the situation you described, as 6 updates were reported as successfully installed just before.

  2. Anonymous

    I can't recall how long exactly it appeared to hang as I was running the updates on multiple machines at once. Perhaps 3 minutes or so.

    When I noticed, I thought I might have marked the PowerShell window or something, but the updates window popped up. So I just pressed Reboot now without stopping the PowerShell session.

  3. Dustin Hatch repo owner
    • changed status to open

    Okay, that's what I imagined. I was able to reproduce this problem just as you described on my server. Unfortunately, I haven't been able to reproduce it in a controlled environment yet, so debugging might be difficult.

    I suspect that it has something to do with the "Cancel called" message above, and these messages that come shortly after it, in both your WindowsUpdate.log file and the one from my server:

    2012-06-26	20:13:19:038	 820	a48	Agent	  * WARNING: Exit code = 0x8024000B
    2012-06-26	20:13:19:038	 820	a48	Agent	WARNING: WU client failed installing updates with error 0x8024000b
  4. Dustin Hatch repo owner

    Okay, I was able to create a debug environment where I was able to reproduce this issue. I think the problem is that when an update fails to install, the Windows Update Agent stops installing updates, but PsychicRobot is not aware. The WUA does not call a callback when this occurs, so I am going to have to figure out some other way of determining the status of the agent.

  5. Log in to comment