@echo off

set server=127.0.0.1
set key=HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate
echo.
reg add %key% /v WUServer /t REG_SZ /d "http://%server%:8530/?" /f
reg add %key% /v WUStatusServer /t REG_SZ /d "http://%server%:8530/?" /f
reg add %key%\AU /v UseWUServer /t REG_DWORD /d 1 /f
net stop wuauserv 2>nul
echo.
echo Press any key to exit.
pause >nul
