Blocco di Windows Update e disinstallazione degli aggiornamenti dopo il riavvio

Talvolta può succedere che il sistema inizi la procedura d’installazione degli aggiornamenti che viene completata dopo un riavvio, al riavvio il sistema non riesce a completare l’installazione il 15 minuti (900 secondi) e quindi procede alla disinstallazione degli aggiornamenti.

Per risolvere questo issue è possibile aumentare il timeout d’installazione come indicato nella KB3064434 Windows Update hangs and new updates are uninstalled after a restart che sebbene riporti che le indicazioni in essa contenute siano applicazioni a sistemi Windows Server 2012 R2, Windows 8.1, Windows Server 2012 o Windows 8 in realtà valgono anche per sistemi successivi.

Symptoms

Consider the following scenario:

  • You have a computer that is running Windows Server 2012 R2, Windows 8.1, Windows Server 2012, or Windows 8.
  • You install updates from Windows Update.
  • You restart Windows when you are prompted to do this.

In this scenario, you see the following message during the restart process:

Working on updates
13% complete
Don’t turn off your computer

 

This is an expected message. However, the system appears to stop responding (hangs) for about 15 minutes. After this time, the system does restart. However, the updates that you just installed are now uninstalled.

Additionally, an entry that resembles the following may be logged in the CBS.log file under %SystemRoot%\Logs\CBS:

 

Shtd: Timed out waiting for shutdown processing to complete – no progress detected in last 900000 milliseconds

 

Cause
This issue occurs because the Trusted Installer service did not finish the installation process within the default time-out period of 15 minutes.

 

Workaround
To work around this issue, set the time-out value to a larger value in the registry, and then reapply the hotfix. To do this, follow these steps:

  1. Start Registry Editor.
  2. Locate the following subkey:
    HKLM\System\CurrentControlSet\Services\TrustedInstaller
  3. Right-click the TrustedInstaller key, and then click Permissions.
  4. Grant the Full Control user right to the Administrators group.
  5. Change the BlockTimeIncrement value to 2a30 (Hexadecimal).

    Note This change sets the time-out value to three hours. This should be sufficient for most situations. However, you may have to try a larger value in your environment.

  6. Restart the server, and then apply the hotfix again.