w10install/scripts/modify-windowsupdate.cmd
Michael H.G. Schmidt 6e3a477750 little reorg
2024-02-23 14:03:56 +01:00

48 lines
1.2 KiB
Batchfile

@echo off
set SCRIPT_SETTINGS=settings.cmd
set CUSTOM_SETTINGS=..\custom\settings.cmd
rem default: disabled
set windows_targetrelease=0
echo ####### %0 #######
echo.
echo searching for SCRIPT settings ...
if NOT EXIST %SCRIPT_SETTINGS% (
echo INFO: config file %SCRIPT_SETTINGS% NOT FOUND
) else (
echo OK. Loading SCRIPT settings ...
call %SCRIPT_SETTINGS%
)
echo.
echo searching for CUSTOM settings ...
if NOT EXIST %CUSTOM_SETTINGS% (
echo INFO: config file %CUSTOM_SETTINGS% NOT FOUND
) else (
echo OK. Loading CUSTOM settings ...
call %CUSTOM_SETTINGS%
)
echo ++++++++++++++++++++++++++++++++++
echo windows_targetrelease=%windows_targetrelease%
echo ++++++++++++++++++++++++++++++++++
echo.
if %windows_targetrelease% == 0 (
echo WARNING: windows target release NOT set!
) else (
echo setting windows update target release ...
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" ^
/v TargetReleaseVersion /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" ^
/v TargetReleaseVersionInfo /t REG_SZ /d %windows_targetrelease% /f
)
echo ####### %0 #######