diff --git a/softwares/FWSUpdates/bin/on_shutdown.bat b/softwares/FWSUpdates/bin/on_shutdown.bat index 487c539..d411754 100644 --- a/softwares/FWSUpdates/bin/on_shutdown.bat +++ b/softwares/FWSUpdates/bin/on_shutdown.bat @@ -7,6 +7,11 @@ IF %ERRORLEVEL% EQU 0 FOR /F "tokens=3" %%A IN ('reg query "HKLM\Software\FWS\Up 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 diff --git a/softwares/FWSUpdates/bin/wpkg_feedback.bat b/softwares/FWSUpdates/bin/wpkg_feedback.bat index f3a0891..7594e29 100644 --- a/softwares/FWSUpdates/bin/wpkg_feedback.bat +++ b/softwares/FWSUpdates/bin/wpkg_feedback.bat @@ -69,7 +69,5 @@ FOR /F "tokens=2 delims= " %%A IN ('cscript %SystemDrive%\FWSUpdates\repository\ SET LIST=!LIST! %%A ) reg add "HKLM\Software\FWS\Updates" /v PendingChanges /t REG_DWORD /d %CHANGES% /f -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 start /w %SystemDrive%\FWSUpdates\bin\wizapp.exe PB CLOSE