This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Reboot to update computer

In Sophos Central, I periodically get an alert that a reboot is required for a computer. Is there any way I can find the location of the file or registry key that says the reboot is required. I know for Windows updates, there is a registry key if a reboot is required after an update. I have a scheduled task that looks for that registry key and reboots the computer after hours if it exists and I would like to do the same for Sophos.



This thread was automatically locked due to age.
Parents Reply
  • Crude, but works

    @echo off
    FOR /F "tokens=3 delims= " %%A IN ('REG QUERY "HKLM\SOFTWARE\Sophos\AutoUpdate\UpdateStatus\VolatileFlags" /v RebootRequired') DO (
    echo %%A
    if %%A EQU 0x1 goto found
    )

    FOR /F "tokens=3 delims= " %%A IN ('REG QUERY "HKLM\SOFTWARE\Wow6432Node\Sophos\AutoUpdate\UpdateStatus\VolatileFlags" /v RebootRequired') DO (
    echo %%A
    if %%A EQU 0x1 goto found
    )

    exit /b

    :found
    shutdown /f /r /t 20 /c "Windows Update Reboot" /d p:2:17

Children
No Data