diff --git a/softwares/FWSUpdates/bin/sync.bat b/softwares/FWSUpdates/bin/sync.bat index bcd1284..0d313c0 100644 --- a/softwares/FWSUpdates/bin/sync.bat +++ b/softwares/FWSUpdates/bin/sync.bat @@ -161,13 +161,13 @@ IF %CHANGES% GTR 0 ( IF ERRORLEVEL 1 ( reg add "HKLM\Software\FWS\Updates" /v ChangesAvailableSince /t REG_DWORD /d %NOW% /f SET /A SINCE=%NOW% - SET /A MAX=%SINCE%+%MAX_REPORT%*86400 + SET /A MAX=%NOW%+%MAX_REPORT%*86400 ) ELSE ( - FOR /F %%A IN ('reg query "HKLM\Software\FWS\Updates" /v ChangesAvailableSince') DO SET /A SINCE=%%A - SET /A MAX=%SINCE%+%MAX_REPORT%*86400 - IF %NOW% GTR %MAX% add "HKLM\Software\FWS\Updates" /v RunOnShutdown /t REG_DWORD /d 1 /f + FOR /F "tokens=3 delims= " %%A IN ('reg query "HKLM\Software\FWS\Updates" /v ChangesAvailableSince') DO SET /A SINCE=%%A + SET /A MAX=!SINCE!+%MAX_REPORT%*86400 + IF %NOW% GTR !MAX! reg add "HKLM\Software\FWS\Updates" /v RunOnShutdown /t REG_DWORD /d 1 /f ) - SET /A DELTA=%NOW%-%SINCE% + SET /A DELTA=%NOW%-!SINCE! goto copylogs ) ELSE ( reg delete "HKLM\Software\FWS\Updates" /v ChangesAvailableSince /f