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.

  • Hello ,

    AFAIK it's indicated by the presence of HKLM\SOFTWARE\Wow6432Node\Sophos\AutoUpdate\UpdateStatus\VolatileFlags (in addition there's a DWORD value RebootRequired=1).

    Christian

  • Would you be willing to share the script for your scheduled task?

  • In reply to Michael Klingler1:

    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