Testing when reboot required for a Microsoft Update involving an update to .NET framework 3.5 and/or 4.7 RRS feed

  • Question

  • I have found a scenario where publishing an AppV package (containing Visual C++ runtimes) on Windows 10 1809, fails when there is a reboot pending following a windows update involving .NET framework. The two updates I encountered this with are KB 4481031 and KB 4480979.

    The logged error message states: Publish-AppvClientPackage : The operation failed because a Side-by-Side assembly cannot be installed until the system is restarted. Please restart the system before proceeding.  Now I cannot be certain that it's the VC++ runtimes that are causing the error, or the application itself, but as I was able to install both VC++ runtimes manually with the VM awaiting a reboot, my guess is that it's the app itself.

    Anyway, that's the background to the issue, but my question is about how I can specifically test for a reboot being required to update assemblies. In this case, there was no PendingFileRenameOperations registry key created, but other indications that a reboot is required were found in the following locations:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SystemUpdateOnBoot (REG_DWORD)
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired\<list of GUID entries> (REG_DWORD)
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS\Mobile Client\Updates Management\Handler\UpdatesRebootStatus
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS\Mobile Client\Software Distribution
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending

    My gut feeling is that the second in the list is favourite, but before I spend hours installing updates one by one manually and trying to capture registry changes, I wanted to see if you super-powered scripting guys could point me in the right direction.




    Wednesday, January 30, 2019 2:37 PM