Re: Seconly Mistake
Posted: 21.08.2017, 19:47
This is how I do it. A bit primitive, but it serves the purpose, for me anyway.
- Code: Select all
::Should work in Windows 7 through Windows 10, most languages.
::The WSUS variable should reflect the correct location.
@echo off
set WSUS=F:\WsusOffline\client
cd /d %WSUS%
for /f %%x in ('wmic path win32_localtime get /format:list ^| findstr "="') do set %%x
if "%Month%"=="1" set Month=January
if "%Month%"=="2" set Month=February
if "%Month%"=="3" set Month=March
if "%Month%"=="4" set Month=April
if "%Month%"=="5" set Month=May
if "%Month%"=="6" set Month=June
if "%Month%"=="7" set Month=July
if "%Month%"=="8" set Month=August
if "%Month%"=="9" set Month=September
if "%Month%"=="10" set Month=October
if "%Month%"=="11" set Month=November
if "%Month%"=="12" set Month=December
set check=%Month% %Year%
findstr /I /C:"%check%" "%WSUS%"\exclude\HideList-seconly.txt > nul
if errorlevel 1 goto mishap
UpdateInstaller.exe
goto end
:mishap
cls
color 0C
echo.
echo.
echo The files needed to prevent download of the Quality Rollup
echo have not been updated this month.
echo.
::Concerning Windows 7 only
echo The files^:
echo %WSUS%\exclude/HideList-seconly.txt and
echo %WSUS%\static/StaticUpdateIds-w61-seconly.txt
echo should be updated by yourself with the appropriate lines or
echo try running UpdateGenerator.exe at a later time.
pause
:end
exit