@echo off REM Only run if needed SET /A USER_RUN=0 SET /A ADMIN_RUN=0 reg query "HKLM\Software\FWS\Updates\User" /v RunOnShutdown 1>NUL 2>NUL IF %ERRORLEVEL% EQU 0 FOR /F "tokens=3" %%A IN ('reg query "HKLM\Software\FWS\Updates\User" /v RunOnShutdown') DO SET /A USER_RUN=%%A reg query "HKLM\Software\FWS\Updates" /v RunOnShutdown 1>NUL 2>NUL IF %ERRORLEVEL% EQU 0 FOR /F "tokens=3" %%A IN ('reg query "HKLM\Software\FWS\Updates" /v RunOnShutdown') DO SET /A ADMIN_RUN=%%A REM disable exec on shutdown in any case reg delete "HKLM\Software\FWS\Updates\User" /v RunOnShutdown /f 1>NUL 2>NUL reg delete "HKLM\Software\FWS\Updates" /v RunOnShutdown /f 1>NUL 2>NUL REM If neither admin nor user RunOnShutdown is enabled, skip execution IF %USER_RUN% NEQ 1 IF %ADMIN_RUN% NEQ 1 goto :EOF call %SystemDrive%\FWSUpdates\bin\wpkg_feedback.bat