Page 1 of 1

[RESOLVED] Since version 2.6, workstations are much more frequently showing "Waiting for restart"

Published: January 20, 2025 - 09:13
by tux
Hello,

Since the upgrade from version 2.5 to 2.6.0.16795, any software update or installation causes the machine to display the status "Waiting for reboot" (wuauserv_status/reboot_needed = true).
This happens with Windows 10 client machines as well as with Windows servers of all versions.

A simple Edge update is enough to put the machines in this reboot-waiting state. This was not the case with version 2.5.
It only "triggered" after installing a Windows update or software that required a reboot.


Server: Debian 12, Wapt Enterprise 2.6.0.16795.
Client: Windows 10

Re: Since version 2.6, posts are much more frequently showing "Waiting for restart"

Published: January 20, 2025 - 10:05 AM
by sfonteneau
Hello.

We've fixed a bug from previous versions.

The machine is considered to be waiting for a reboot because the following registry keys are active:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\UpdateExeVolatile and
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations.

Therefore, the machine is waiting for a reboot. So yes, installing Edge causes a "waiting for reboot" message.

Re: Since version 2.6, posts are much more frequently showing "Waiting for restart"

Published: January 20, 2025 - 11:33
by tux
Thanks for the feedback.

Is there a way to distinguish the wait for a reboot following a Windows update from other cases (I'm talking about at the Python script level)?

Re: Since version 2.6, posts are much more frequently showing "Waiting for restart"

Published: January 20, 2025 - 4:33 PM
by sfonteneau
Using this example, yes, you can make your choice:

Code: Select all

    reboot_required = registry_readstring(HKEY_LOCAL_MACHINE, r'SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update', 'RebootRequired', 0)
    if reboot_required:
        result.append('Windows Update: %s' % reboot_required)
    reboot_pending = registry_readstring(HKEY_LOCAL_MACHINE, r'SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing', 'RebootPending', 0)
    if reboot_pending:
        result.append('CBS Updates: %s' % reboot_pending)
    update_exe_volatile = reg_key_exists(HKEY_LOCAL_MACHINE, r'SOFTWARE\Microsoft\Updates\UpdateExeVolatile')
    if update_exe_volatile:
        result.append('Update Exe Volatile: %s' % update_exe_volatile)
    renames_pending = registry_readstring(HKEY_LOCAL_MACHINE, r'SYSTEM\CurrentControlSet\Control\Session Manager', 'PendingFileRenameOperations', None)
    if renames_pending:
        result.append('File renames: %s' % renames_pending)

Re: Since version 2.6, posts are much more frequently showing "Waiting for restart"

Published: January 20, 2025 - 4:40 PM
by tux
Perfect, thank you.