We'd love to hear about it! Click here to go to the product suggestion community
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.
AFAIK it's indicated by the presence of HKLM\SOFTWARE\Wow6432Node\Sophos\AutoUpdate\UpdateStatus\VolatileFlags (in addition there's a DWORD value RebootRequired=1).
Would you be willing to share the script for your scheduled task?
In reply to Michael Klingler1:
Crude, but works
@echo offFOR /F "tokens=3 delims= " %%A IN ('REG QUERY "HKLM\SOFTWARE\Sophos\AutoUpdate\UpdateStatus\VolatileFlags" /v RebootRequired') DO (echo %%Aif %%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 %%Aif %%A EQU 0x1 goto found)
:foundshutdown /f /r /t 20 /c "Windows Update Reboot" /d p:2:17