Unconditionaly remove RunOnShutdown keys during shutdown

So even an error during wpkg_feedback.bat execution would remove the key and let sync after a reboot
master
Daniel Berteaud 9 years ago
parent 7c08679538
commit aae88ed4ac
  1. 5
      softwares/FWSUpdates/bin/on_shutdown.bat
  2. 2
      softwares/FWSUpdates/bin/wpkg_feedback.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 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 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 IF %USER_RUN% NEQ 1 IF %ADMIN_RUN% NEQ 1 goto :EOF
call %SystemDrive%\FWSUpdates\bin\wpkg_feedback.bat call %SystemDrive%\FWSUpdates\bin\wpkg_feedback.bat

@ -69,7 +69,5 @@ FOR /F "tokens=2 delims= " %%A IN ('cscript %SystemDrive%\FWSUpdates\repository\
SET LIST=!LIST! %%A SET LIST=!LIST! %%A
) )
reg add "HKLM\Software\FWS\Updates" /v PendingChanges /t REG_DWORD /d %CHANGES% /f 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 start /w %SystemDrive%\FWSUpdates\bin\wizapp.exe PB CLOSE

Loading…
Cancel
Save