28 lines
1.7 KiB
Batchfile
28 lines
1.7 KiB
Batchfile
net session >nul 2>&1 || (powershell start-process '%~f0' -verb runas & exit /b)
|
|
whoami /groups | find "TrustedInstaller" >nul || (NSudoLC -U:T -P:E cmd /c "%~f0" & exit /b)
|
|
|
|
schtasks /delete /tn "\Microsoft\Windows\WindowsUpdate\RUXIM\PLUGScheduler" /f
|
|
|
|
echo \Registry\Machine\SYSTEM\CurrentControlSet\Services\wuauserv [1 5] > "%temp%\fk.ini" & echo \Registry\Machine\SYSTEM\CurrentControlSet\Services\WaaSMedicSvc [1 5] >> "%temp%\fk.ini" & regini "%temp%\fk.ini" & reg delete "HKLM\SYSTEM\CurrentControlSet\Services\wuauserv" /v FailureActions /f & reg delete "HKLM\SYSTEM\CurrentControlSet\Services\WaaSMedicSvc" /v FailureActions /f & del "%temp%\fk.ini"
|
|
|
|
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" /v SetDisableUXWUAccess /t REG_DWORD /d 1 /f
|
|
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v AutoInstallMinorUpdates /t REG_DWORD /d 0 /f
|
|
|
|
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v NoAutoUpdate /t REG_DWORD /d 1 /f
|
|
|
|
rd /s /q "%SystemRoot%\System32\Tasks\Microsoft\Windows\WindowsUpdate"
|
|
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Windows\WindowsUpdate" /f
|
|
|
|
taskkill /f /im UsoClient.exe
|
|
taskkill /f /im WaaSMedicAgent.exe
|
|
taskkill /f /im SIHClient.exe
|
|
taskkill /f /im wuauclt.exe
|
|
taskkill /f /im usocoreworker.exe
|
|
ren "C:\Windows\System32\UsoClient.exe" UsoClient.exe.bak
|
|
ren "C:\Windows\System32\WaaSMedicAgent.exe" WaaSMedicAgent.exe.bak
|
|
ren "C:\Windows\System32\SIHClient.exe" SIHClient.exe.bak
|
|
ren "C:\Windows\System32\wuauclt.exe" wuauclt.exe.bak
|
|
ren "C:\Windows\System32\usocoreworker.exe" usocoreworker.exe.bak
|
|
|
|
gpupdate /force |