@echo off
echo === KILL UPDATE PROCESSES ===
taskkill /F /IM "MoUsoCoreWorker.exe" /T >nul 2>&1
taskkill /F /IM "usoclient.exe" /T >nul 2>&1
taskkill /F /IM "wuauclt.exe" /T >nul 2>&1
echo === STOP SERVICES ===
net stop wuauserv /y >nul 2>&1
net stop bits /y >nul 2>&1
net stop UsoSvc /y >nul 2>&1
net stop DoSvc /y >nul 2>&1
echo === DISABLE SERVICE MAIN ===
sc config wuauserv start= disabled >nul 2>&1
sc config bits start= disabled >nul 2>&1
sc config UsoSvc start= disabled >nul 2>&1
echo === APPLY REGISTRY POLICIES ===
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DoNotConnectToWindowsUpdateInternetLocations /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v NoAutoUpdate /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v AUOptions /t REG_DWORD /d 1 /f
echo === DISABLE TASK SCHEDULER UPDATE ===
schtasks /Change /TN "\Microsoft\Windows\WindowsUpdate\Scheduled Start" /Disable >nul 2>&1
schtasks /Change /TN "\Microsoft\Windows\WindowsUpdate\Maintenance Install" /Disable >nul 2>&1
schtasks /Change /TN "\Microsoft\Windows\UpdateOrchestrator\Schedule Scan" /Disable >nul 2>&1
schtasks /Change /TN "\Microsoft\Windows\UpdateOrchestrator\Schedule Retry Scan" /Disable >nul 2>&1
schtasks /Change /TN "\Microsoft\Windows\UpdateOrchestrator\USO_UxBroker" /Disable >nul 2>&1
echo === RENAME SOFTWARE DISTRIBUTION ===
ren C:\Windows\SoftwareDistribution SoftwareDistribution.old >nul 2>&1
echo === DONE ===
pause