@echo off
setlocal
set regfile=%systemdrive%\temp\SUS.reg
ECHO Stopping Automatic Updates service
Net Stop "wuauserv"
ECHO.
ECHO Configuring SUS server registry entries. Please stand by....
echo Windows Registry Editor Version 5.00>%regfile%
echo.>>%regfile%
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate]>>%regfile%
echo "WUServer"="http://IP_OF_YOUR_SUS_SERVER">>%regfile%
echo "WUStatusServer"="http://IP_OF_YOUR_SUS_SERVER">>%regfile%
echo.>>%regfile%
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU]>>%regfile%
echo "NoAutoUpdate"=dword:00000000>>%regfile%
REM
REM 4=Automatically downloads updates. Installation will occur at the scheduled
REM day/time. While scheduled, an Admin-priv user will see a brief balloon and
REM systemtray icon, this allows the update to be installed before the scheduled time.
echo "AUOptions"=dword:00000004>>%regfile%
echo "ScheduledInstallDay"=dword:00000000>>%regfile%
echo "ScheduledInstallTime"=dword:0000000C>>%regfile%
REM
REM 15=If the computer is switched-off at the scheduled installation time, this setting will initiate
REM the installation at 15 minutes after restart.
echo "RescheduleWaitTime"=dword:00000015>>%regfile%
echo "NoAutoRebootWithLoggedOnUsers"=dword:00000001>>%regfile%
echo "UseWUServer"=dword:00000001>>%regfile%
echo.>>%regfile%
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Critical Update]>>%regfile%
echo "SelfUpdServer"="http://IP_OF_YOUR_SUS_SERVER/SelfUpdate/CUN5_4">>%regfile%
echo.>>%regfile%
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Critical Update\Critical Update SelfUpdate]>>%regfile%
echo "SelfUpdServer"="http://IP_OF_YOUR_SUS_SERVER/SelfUpdate/CUN5_4">>%regfile%
echo.>>%regfile%
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update]>>%regfile%
echo "LastWaitTimeout"="">>%regfile%