我们已经将一些计算机升级到Windows 10,并意识到其中有一些更新会根据需要进行更新。但是,我意识到没有类似于Windows 7和8.1的选项可以停止下载。我可以停止下载的唯一方法是停止Windows Update服务。
我的问题是,有人知道停止自动更新的方法还是停止服务是唯一的解决方案?
我们已经将一些计算机升级到Windows 10,并意识到其中有一些更新会根据需要进行更新。但是,我意识到没有类似于Windows 7和8.1的选项可以停止下载。我可以停止下载的唯一方法是停止Windows Update服务。
我的问题是,有人知道停止自动更新的方法还是停止服务是唯一的解决方案?
Answers:
如果您具有Pro Edition,请打开组策略编辑器(gpedit.msc)搜索Configure automatic updates
位于以下位置的条目:
computer configuration → administrative templates → windows components → windows update
然后选择Notify for download and notify for install
。
Windows检测到新更新时,将显示敬酒通知。
您也可以使用Update KB3073930中的疑难解答程序来禁用某些有问题的更新,以便不再安装它们。
这是Microsoft阻止安装不需要的更新和驱动程序的官方方法。
但是有一个名为Windows Update MiniTool的第三方工具,它可以选择可以安装的更新,并可以像以前的Windows版本一样阻止更新。
标准Windows Update的替代方法可以执行的操作:
•检查更新
•下载更新
•安装更新
•删除已安装的更新
• 隐藏不需要的更新
•获取指向* .cab / * .Exe / * .Psf更新文件的直接链接
•查看更新历史记录
• 配置自动更新
•该工具类似于外部Powershell模块PSWindowsUpdate,但具有更多高级功能和用户友好功能
•该工具依赖并使用相同的WU基础结构,所有下载均通过WU进行,而不是下载程序
用户slavanap 在评论中发布了第二个工具,该工具可让您有选择地安装更新。它称为Windows10手动更新,可在github上找到:
在Windows 10 Creators Update中,有一个选项可以将Windows Update停止35天:
在“设置”应用下的Windows Update选项中。
关于Windows 10最具争议的方面之一是Microsoft决定强制进行更新。如果您具有Windows 10 Pro,Enterprise或Education版本,则可以推迟更新,但不能完全拒绝它们。
如果您不满意Microsoft在您的要求下强行在系统上安装更新,可以使用W10Privacy阻止此功能。
如果您从未听说过此程序,那么值得一试,因为该软件使您可以控制Windows 10的许多隐私功能,从而可以防止操作系统窥探您的工作。选项采用颜色编码,因此您可以一眼看出更改/禁用某些内容是否安全。
在W10Privacy 2中,您现在可以将程序设置为禁用Windows 10自己的更新机制,并将其替换为自己的更新机制。用户可以选择要安装的更新,以及可以忽略的更新。这不是每个人都应该做的,但是您可以轻松地撤消需要的步骤。
使用此功能之前,您需要下载一些其他组件。跟着这些步骤:
W10Privacy.exe
并从上下文菜单中选择“以管理员身份运行”。选择创建系统还原点。进行完整的系统备份也是值得的(以防万一)。配置伪造的WSUS服务器。
W10Privacy位于没有空格的路径/文件夹中。不要在更新搜索中考虑驱动程序。
负责更新后,请定期运行该软件并检查以确保您没有错过任何重要的更新。
学分:
借助@Ramhound,我设法弄清楚了如何在Windows 10上停止自动更新。
请注意,这适用于Windows 10 Pro,因为它是我正在运行的版本。
要停止自动更新,您可以执行以下操作:
更新资料
如@Vinayak的评论中所述,现在,延迟选项也可供家庭用户使用。这里的更多信息
Wuauserv
服务在那里,可以停止/禁用。这就是我最初停止更新的方式
大量重做以前的批处理文件会将套件切换为单个脚本,并且阻止了最佳实践!
观看动作
桌面右键单击上下文菜单动态用户界面,所有功能均可切换!
切换所有块的开/关,续订(从pastebin)或卸载脚本选项
隐藏/取消隐藏/安装带有计数器的更新列表!
只要Windows通过MusNotification困扰您,列表就会自动更新!
独立阻止构建升级,自动安装,下载,服务
IFEO安全阻止,而不会破坏性更改所有权,删除文件或删除任务
专注于独立运行的Defender更新
切换窗口混乱自动更新不会牺牲内置保护层,这
与其他任何-DIY-更新“管理”不同
@set @version=10.0 /* &title Windows Update Toggle
@echo off &set "verbose="
echo.
echo ---------------------------------------------------------------------
echo : Windows Update Toggle v10.0 final :
echo :---------------------------------------------------------------------:
echo : Block/Enable Upgrades, Installs, Downloads(!), Service(!) :
echo : Disable/Enable Reporting, Speech, SearchUI, Defender :
echo : Hide/Unhide/Apply update lists with count and max size :
echo : Preset for Defender updates and Store downloads working :
echo : :
echo : Toggle from the comfort of Desktop right-click context menu :
echo ---------------------------------------------------------------------
echo.
:: AveYo, 2018-05-13
if %1.==. timeout /t 10 &call wscript /e:JScript "%~f0" runas setup &exit/b &rem : no arguments, run setup elevated
if %1.==shift. shift &shift &rem : if loaded by WScript, shift args to prevent loop and restore %0
if %1.==. echo ERROR! &timeout /t 5 &exit/b : must have at least one arg
:: Setup executable blocking via ifeo
set notifier=EOSNotify MusNotification
set upgrader=Windows10UpgraderApp Windows10Upgrade WindowsUpdateBox SetupHost setupprep
set installer=wuauclt
set reporter=wermgr wsqmcons DiagTrackRunner DiagnosticsHub.StandardCollector.Service CompatTelRunner
set speecher=SpeechRuntime SpeechModelDownload
set searcher=SearchUI
set "exe=%notifier% %upgrader% %installer% %reporter%"
set "noop=%SystemRoot%\system32\systray.exe"
set "ifeo=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options"
set "menu=HKCR\DesktopBackground\shell\WUT"
set "f0=%SystemRoot%\windows_update_toggle.bat"
set "task=wscript.exe /e:JScript \"%f0%\" schtasks WUT"
set "DefMUS={MicrosoftUpdateServer|MMPC|InternalDefinitionUpdateServer}"
set "DefMMPC={MMPC|MicrosoftUpdateServer|InternalDefinitionUpdateServer}"
set ".=>nul 2>nul"
for /f "tokens=2 delims=1234567890" %%# in ('shutdown /?^|findstr /bc:"E"') do set "[T]=%%#" &rem : cosmetic usage in menus
if defined verbose (echo on &set ".=" &set "window=") else set "window=hide"
call :%~1 %2 %3 %4 %5 %6 %7 %8 %9 &rem : launch secondary functions below dinamically, passing next args
echo.
echo Done! Use the Desktop right-click context menu to toggle, renew or uninstall
if "%~1"=="setup" (pause) else if defined verbose timeout /t 5
exit/b : End of main script, functions below
:refresh context menu
echo %0 %*
call :reg_query "HKLM\SOFTWARE\WUT.bat" NoBlock noblock
if "%noblock%"=="Enable" exit/b
call :reg_query "%menu%0pending" MUIVerb pending
if defined pending exit/b
for %%# in ("1hide" "2unhide" "3apply") do reg delete "%menu%%%~#" /f %.%
reg add "%menu%0pending" /v MUIVerb /d "Pending.." /f %.%
reg add "%menu%0pending" /v SubCommands /d "" /f %.%
call :reg_query "HKLM\SOFTWARE\WUT.bat" NoRefresh norefresh
if "%norefresh%"=="Disable" start "WUT" wscript /e:JScript "%f0%" WUTRefresh
call :status SetupHost
reg add "%menu%\shell\3Upgrades" /v MUIVerb /d "Upgrades %[T]% [setuphost] %toggle%" /f %.%
reg add "%menu%\shell\3Upgrades\command" /ve /d "%task%\upgrades" /f %.%
call :status wuauclt
reg add "%menu%\shell\4Installs" /v MUIVerb /d "Installs %[T]% [wuauclt] %toggle%" /f %.%
reg add "%menu%\shell\4Installs\command" /ve /d "%task%\installs" /f %.%
for /f "tokens=3" %%# in ('sc qc TrustedInstaller ^| find /I "WUTblocked"') do set "blocked=%%#"
if /i "%blocked%"=="[WUTblocked]" (set "toggle=blocked") else set "toggle=enabled"
reg add "%menu%\shell\5Downloads" /v MUIVerb /d "Downloads ( ! ) %[T]% [trustedinstaller] %toggle%" /f %.%
reg add "%menu%\shell\5Downloads\command" /ve /d "%task%\downloads" /f %.%
for /f "tokens=3" %%# in ('sc qc wuauserv ^| find /I "WUTblocked"') do set "blocked=%%#"
if /i "%blocked%"=="rpcss[WUTblocked]" (set "toggle=blocked") else set "toggle=enabled"
reg add "%menu%\shell\6Service" /v MUIVerb /d "Service ( ! ) %[T]% [wuauserv] %toggle%" /f %.%
reg add "%menu%\shell\6Service\command" /ve /d "%task%\service" /f %.%
call :status wermgr
reg add "%menu%\shell\81Report" /v MUIVerb /d "Report %[T]% %toggle%" /f %.%
reg add "%menu%\shell\81Report\command" /ve /d "%task%\report" /f %.%
call :status SpeechRuntime
reg add "%menu%\shell\82Speech" /v MUIVerb /d "Speech %[T]% %toggle%" /f %.%
reg add "%menu%\shell\82Speech\command" /ve /d "%task%\speech" /f %.%
call :status SearchUI
reg add "%menu%\shell\83Search" /v MUIVerb /d "SearchUI %[T]% %toggle%" /f %.%
reg add "%menu%\shell\83Search\command" /ve /d "%task%\search" /f %.%
set "defstatus=if((Get-MpPreference).DisableRealtimeMonitoring){write-host stopped}else{write-host enabled}"
for /f "delims=" %%# in ('call powershell.exe -c "%defstatus%;"') do set "toggle=%%#"
reg add "%menu%\shell\84Defender" /v MUIVerb /d "Defender %[T]% %toggle%" /f %.%
reg add "%menu%\shell\84Defender\command" /ve /d "%task%\defender" /f %.%
if "%norefresh%"=="Enable" reg delete "%menu%0pending" /f %.%
exit/b
:toggle WUT
echo %0 %*
call :reg_query "HKLM\SOFTWARE\WUT.bat" NoBlock noblock
if "%noblock%"=="Disable" (set "toggle=Enable") else set "toggle=Disable"
for %%# in (NoBlock NoRefresh) do reg add "HKLM\SOFTWARE\WUT.bat" /v %%# /d "%toggle%" /f %.%
:: Generate WUT main context menu
for %%# in ("" "0pending" "1hide" "2unhide" "3apply") do reg delete "%menu%%%~#" /f %.%
reg add "%menu%" /v MUIVerb /d "Windows Update Toggle" /f %.%
reg add "%menu%" /v Icon /d "appwiz.cpl,5" /f %.%
reg add "%menu%" /v SubCommands /d "" /f %.%
reg add "%menu%\shell\9Setup" /v MUIVerb /d "windows_update_toggle.bat v10.0" /f %.%
reg add "%menu%\shell\9Setup" /v SubCommands /d "" /f %.%
reg add "%menu%\shell\9Setup\shell\1Toggle" /v MUIVerb /d "%toggle%" /f %.%
reg add "%menu%\shell\9Setup\shell\2Renew" /v MUIVerb /d "Renew" /f %.%
reg add "%menu%\shell\9Setup\shell\3Remove" /v MUIVerb /d "Remove" /f %.%
reg add "%menu%\shell\9Setup\shell\1Toggle\command" /ve /d "%task%\toggle" /f %.%
reg add "%menu%\shell\9Setup\shell\2Renew\command" /ve /d "%task%\renew" /f %.%
reg add "%menu%\shell\9Setup\shell\3Remove\command" /ve /d "%task%\remove" /f %.%
if "%toggle%"=="Disable" (
reg add "%menu%\shell\1Refresh" /v MUIVerb /d "Refresh" /f %.%
reg add "%menu%\shell\1Refresh\command" /ve /d "%task%\refresh" /f %.%
reg add "%menu%\shell\2Lists" /v MUIVerb /d "Hide / Unhide / Apply %[T]% enabled" /f %.%
reg add "%menu%\shell\2Lists\command" /ve /d "%task%\lists" /f %.%
reg add "%menu%\shell\7Repair" /v MUIVerb /d "Troubleshooter" /f %.%
reg add "%menu%\shell\7Repair\command" /ve /d "%task%\repair" /f %.%
)
:: Disabling automatic updates hinders Defender, so get definitions from MMPC first
if "%toggle%"=="Enable" ( set "DefSig=%DefMUS%" ) else set "DefSig=%DefMMPC%"
start "WUT:MpPref" wscript /e:JScript "%~f0" cmd "powershell.exe -c `Set-MpPreference -SignatureFallbackOrder %DefSig%;`"
:: Default services
sc config wuauserv type= share depend= rpcss %.%
sc config TrustedInstaller type= own depend= / %.%
:: Toggle ifeo exe blocking
for %%# in (%exe% %speech% %search%) do reg delete "%ifeo%\%%#.exe" /f %.%
if "%toggle%"=="Enable" exit/b WUT disabled, so skip the code below
for %%# in (%exe%) do reg add "%ifeo%\%%#.exe" /v Debugger /d "%noop%" /f %.% &taskkill /im "%%#.exe" /t /f %.%
:: WUTRefresh hijacking
for %%# in (MusNotification EOSNotify) do reg add "%ifeo%\%%#.exe" /v Debugger /d "%SystemRoot%\WUTRefresh.bat" /f %.%
call :refresh menu
exit/b
:hide update
echo %0 %*
call :reg_query "%menu%1hide\shell\%~1" MUIVerb updatefound
echo -%updatefound%
if not defined updatefound exit/b
call wscript /e:JScript "%f0%" hide "%updatefound%"
exit/b
:unhide update
echo %0 %*
call :reg_query "%menu%2unhide\shell\%~1" MUIVerb updatefound
echo -%updatefound%
if not defined updatefound exit/b
call wscript /e:JScript "%f0%" unhide "%updatefound%"
exit/b
:apply update
echo %0 %*
call :reg_query "%menu%3apply\shell\%~1" MUIVerb updatefound
echo -%updatefound%
if not defined updatefound exit/b
:: Temporarily unblock downloads and installs
call :reg_query "%ifeo%\wuauclt.exe" Debugger installs_blocked
for /f "tokens=3" %%# in ('sc qc TrustedInstaller ^| find /I "WUTblocked"') do set "downloads_blocked=%%#"
call wscript /e:JScript "%f0%" apply "%updatefound%"
:: Restore block
if defined installs_blocked reg add "%ifeo%\wuauclt.exe" /v Debugger /d "%noop%" /f %.% &taskkill /im "wuauclt.exe" /t /f %.%
if defined downloads_blocked sc config TrustedInstaller type= own depend= [WUTblocked] %.%
exit/b
:lists
echo %0 %*
call :reg_query "HKLM\SOFTWARE\WUT.bat" NoRefresh norefresh
if "%norefresh%"=="Disable" ( set "norefresh=Enable" &set "toggle=disabled") else set "norefresh=Disable" &set "toggle=enabled"
reg add "HKLM\SOFTWARE\WUT.bat" /v NoRefresh /d "%norefresh%" /f %.%
reg add "%menu%\shell\2Lists" /v MUIVerb /d "Hide / Unhide / Apply %[T]% %toggle%" /f %.%
reg add "%menu%\shell\1Refresh" /v MUIVerb /d "Refresh" /f %.%
reg add "%menu%\shell\1Refresh\command" /ve /d "%task%\refresh" /f %.%
if "%norefresh%"=="Enable" (
reg delete "%menu%0pending" /f %.% ® delete "%menu%1hide" /f %.% ® delete "%menu%2unhide" /f %.%
reg delete "%menu%3apply" /f %.% ® delete "%menu%\shell\1Refresh" /f %.%
)
call :refresh lists
exit/b
:upgrades
echo %0 %*
call :flip SetupHost
reg add "%menu%\shell\3Upgrades" /v MUIVerb /d "Upgrades %[T]% [setuphost] %toggle%" /f %.%
for %%# in (%upgrader%) do if defined block (
reg delete "%ifeo%\%%#.exe" /f %.%
) else (
reg add "%ifeo%\%%#.exe" /v Debugger /d "%noop%" /f %.% &taskkill /im "%%#.exe" /t /f %.%
)
exit/b
:installs
echo %0 %*
call :flip wuauclt
reg add "%menu%\shell\4Installs" /v MUIVerb /d "Installs %[T]% [wuauclt] %toggle%" /f %.%
for %%# in (%installer%) do if defined block (
do reg delete "%ifeo%\%%#.exe" /f %.% &start "wt" wscript /e:JScript "%f0%" WUTRefresh
) else (
reg add "%ifeo%\%%#.exe" /v Debugger /d "%SystemRoot%\WUTRefresh.bat" /f %.% &taskkill /im "%%#.exe" /t /f %.%
)
exit/b
:downloads
echo %0 %*
call :reg_query "%menu%3apply" MUIVerb pending
set "reboot=%pending:reboot=%"
if defined pending if "%pending%"=="%reboot%" set "pending="
if defined pending (
sc config TrustedInstaller type= own depend= / %.%
reg add "%menu%\shell\5Downloads" /v MUIVerb /d "Downloads ( ! ) %[T]% [trustedinstaller] reboot?" /f %.%
exit/b
)
for /f "tokens=3" %%# in ('sc qc TrustedInstaller ^| find /I "WUTblocked"') do set "blocked=%%#"
if /i "%blocked%"=="[WUTblocked]" (set "blocked=/") else set "blocked=[WUTblocked]"
net stop TrustedInstaller /y %.%
for /f "tokens=3" %%# in ('sc queryex TrustedInstaller ^| find /i "PID"') do set "pid=%#"
if not "%pid%"=="0" taskkill /pid %pid% /f %.%
sc config TrustedInstaller type= own depend= %blocked% %.%
tasklist /svc | find /i "TrustedInstaller" %.%
if errorlevel 1 net start TrustedInstaller /y %.%
if errorlevel 1 (set "toggle=blocked") else set "toggle=enabled"
reg add "%menu%\shell\5Downloads" /v MUIVerb /d "Downloads ( ! ) %[T]% [trustedinstaller] %toggle%" /f %.%
if "%toggle%"=="enabled" start "WUT" wscript /e:JScript "%f0%" WUTRefresh
exit/b
:service
echo %0 %*
for /f "tokens=3" %%# in ('sc qc wuauserv ^| find /I "WUTblocked"') do set "blocked=%%#"
if /i "%blocked%"=="rpcss[WUTblocked]" (set "blocked=rpcss") else set "blocked=rpcss[WUTblocked]"
net stop wuauserv /y %.%
for /f "tokens=3" %%# in ('sc queryex wuauserv ^| find /i "PID"') do set "pid=%#"
if not "%pid%"=="0" taskkill /pid %pid% /f %.%
sc config wuauserv type= share depend= %blocked% %.%
tasklist /svc | find /i "wuauserv" %.%
if errorlevel 1 net start wuauserv /y %.%
if errorlevel 1 (set "toggle=blocked") else set "toggle=enabled"
reg add "%menu%\shell\6Service" /v MUIVerb /d "Service ( ! ) %[T]% [wuauserv] %toggle%" /f %.%
if "%toggle%"=="enabled" start "WUT" wscript /e:JScript "%f0%" WUTRefresh
exit/b
:repair
echo %0 %*
:: Restore services (undo only the changes made by this script, not whatever blocking was done by other means)
sc config wuauserv type= share depend= rpcss %.%
sc config TrustedInstaller type= own depend= / %.%
:: Remove any IFEO blocking done by past scripts
set eo=DiagnosticsHub.StandardCollector.Service WindowsUpdateElevatedInstaller LocationNotificationWindows InstallAgentUserBroker
set eo=%eo% UpdateNotificationMgr DataUsageLiveTileTask Windows10UpgraderApp WindowsActionDialog SpeechModelDownload WerFaultSecure
set eo=%eo% GetCurrentRollback WindowsUpdateBox Windows10Upgrade TrustedInstaller MusNotification DiagTrackRunner CompatTelRunner
set eo=%eo% WinREBootApp64 WinREBootApp32 UNPUXLauncher SpeechRuntime MusNotifyIcon PilotshubApp InstallAgent dstokenclean wsqmcons
set eo=%eo% disksnapshot osrssupdate wuapihost WaaSMedic UsoClient UNPUXHost SIHClient setupprep SetupHost osrssinst EOSNotify wusa
set eo=%eo% WerFault TiWorker SearchUI DWTRIG20 dusmtask dmclient appidtel wuauclt wermgr DFDWiz remsh reach HxTsr DWWIN DW20 GWX
for %%# in (%eo%) do reg delete "%ifeo%\%%#.exe" /f %.%
:: Restore notification hijacking
>"%SystemRoot%\WUTRefresh.bat" echo/@start "WUTRefresh" /min wscript.exe /e:JScript "%f0%" WUTRefresh
for %%# in (MusNotification EOSNotify) do reg add "%ifeo%\%%#.exe" /v Debugger /d "%SystemRoot%\WUTRefresh.bat" /f %.%
:: Remove pending instance safeguard
reg delete "HKLM\SOFTWARE\WUT.bat" /v Pending /f %.%
:: Refresh menu
call :refresh repair
:: Open Update Diagnostic
start "wud" msdt.exe /id WindowsUpdateDiagnostic %.%
:: Open official update troubleshooter page
start https://support.microsoft.com/en-us/help/4027322/windows-update-troubleshooter %.%
exit/b
:report
echo %0 %*
call :flip wermgr
reg add "%menu%\shell\81Report" /v MUIVerb /d "Report %[T]% %toggle%" /f %.%
for %%# in (%reporter%) do if defined block ( reg delete "%ifeo%\%%#.exe" /f %.% ) else (
reg add "%ifeo%\%%#.exe" /v Debugger /d "%noop%" /f %.% &taskkill /im "%%#.exe" /t /f %.%
)
exit/b
:speech
echo %0 %*
call :flip SpeechRuntime
reg add "%menu%\shell\82Speech" /v MUIVerb /d "Speech %[T]% %toggle%" /f %.%
for %%# in (%speecher%) do if defined block ( reg delete "%ifeo%\%%#.exe" /f %.% ) else (
reg add "%ifeo%\%%#.exe" /v Debugger /d "%noop%" /f %.% &taskkill /im "%%#.exe" /t /f %.%
)
exit/b
:search
echo %0 %*
call :flip SearchUI
reg add "%menu%\shell\83Search" /v MUIVerb /d "SearchUI %[T]% %toggle%" /f %.%
for %%# in (%searcher%) do if defined block ( reg delete "%ifeo%\%%#.exe" /f %.% ) else (
reg add "%ifeo%\%%#.exe" /v Debugger /d "%noop%" /f %.% &taskkill /im "%%#.exe" /t /f %.%
)
exit/b
:defender
echo %0 %*
set "s10=$t=1;$toggle='stopped'; if((Get-MpPreference).DisableRealtimeMonitoring){$t=0;$toggle='enabled';}"
set "s11=Set-MpPreference -DisableRealtimeMonitoring $t"
set "s12=Set-MpPreference -DisableBehaviorMonitoring $t"
set "s13=Set-MpPreference -DisableIOAVProtection $t"
set "s14=write-host $toggle"
for /f "delims=" %%# in ('call powershell.exe -c "%s10%;%s11%;%s12%;%s13%;%s14%;"') do set "toggle=%%#"
reg add "%menu%\shell\84Defender" /v MUIVerb /d "Defender %[T]% %toggle%" /f %.%
exit/b
:update_defender - triggered from WScript to get definitions from MMPC, regardless of updates being blocked
tasklist /FI "IMAGENAME eq MpCmdRun.exe" | find ".exe" %.%
if not errorlevel 1 exit/b
pushd %ProgramFiles%\Windows Defender
call MpCmdRun.exe -removedefinitions -dynamicsignatures
call MpCmdRun.exe -SignatureUpdate -MMPC
exit/b
:setup
echo %0 %*
pushd %SystemRoot%
if /i "%~f0"=="%f0%" (set "initial_setup=") else copy /y "%~f0" "%f0%" %.%
:: Create WUTUndo for emergencies
>WUTUndo.bat echo/pushd %%~dp0system32\config
>>WUTUndo.bat echo/reg load HKLM\WUTUndo1 SOFTWARE
>>WUTUndo.bat echo/set "koff=HKLM\WUTUndo1\Microsoft\Windows NT\CurrentVersion\Image File Execution Options" ^&set "kon=%ifeo%"
>>WUTUndo.bat echo/for %%%%B in (%exe%) do for %%%%K in ("%%koff%%" "%%kon%%") do reg delete "%%%%~K\%%%%B.exe" /f 2^>nul
>>WUTUndo.bat echo/reg unload HKLM\WUTUndo1
>>WUTUndo.bat echo/reg load HKLM\WUTUndo2 SYSTEM
>>WUTUndo.bat echo/for %%%%K in (WUTUndo2 SYSTEM) do (
>>WUTUndo.bat echo/ reg delete "HKLM\%%%%~K\ControlSet001\Services\TrustedInstaller" /v DependOnService /f 2^>nul
>>WUTUndo.bat echo/ reg delete "HKLM\%%%%~K\CurrentControlSet\Services\TrustedInstaller" /v DependOnService /f 2^>nul
>>WUTUndo.bat echo/)
>>WUTUndo.bat echo/reg unload HKLM\WUTUndo2
:: Create WUTRefresh to hijack update notifications and refresh context menu in addition to preventing forced reboots
>WUTRefresh.bat echo/@start "WUTRefresh" /min wscript.exe /e:JScript "%f0%" WUTRefresh
:: Create tasks to run context menu entries with proper access and no output window
start "WUT" wscript /e:JScript "%~f0" cmd "call `%~f0` setup_schtasks"
:: WUT options
for %%# in (NoBlock NoRefresh) do reg add "HKLM\SOFTWARE\WUT.bat" /v %%# /d "Enable" /f %.%
call :toggle blocking
exit/b
:setup_schtasks - no stalling separate process
set "strun=wscript.exe /e:JScript \"%f0%\" run%window%"
for %%t in (refresh lists upgrades installs downloads service repair report speech search defender toggle renew remove) do (
schtasks /create /ru "%username%" /sc once /tn "WUT\%%t" /tr "%strun% %%t" /st "00:00:00" /it /rl highest /f %.%
)
for %%t in (hide unhide apply) do for /l %%n in (101,1,116) do (
schtasks /create /ru "%username%" /sc once /tn "WUT\%%t\%%n" /tr "%strun% %%t %%n" /st "00:00:00" /it /rl highest /f %.%
)
exit/b
:renew
echo %0 %*
echo Renewing from internet - old version saved as %SystemRoot%\WUT.old
pushd %SystemRoot%
if exist WUT.new del /f /q WUT.new %.%
call wscript /e:JScript "%~f0" renew "https://pastebin.com/raw/gNsLEWJe" "%SystemRoot%\WUT.new"
if exist WUT.new copy /y "%f0%" WUT.old %.% © /y WUT.new "%f0%" %.% &del /f /q WUT.new %.%
start "WUT" "%f0%" setup renew %.%
exit/b
:remove
echo %0 %*
for %%# in (NoBlock NoRefresh) do reg add "HKLM\SOFTWARE\WUT.bat" /v %%# /d "Disable" /f %.%
call :toggle off
reg delete "HKLM\SOFTWARE\WUT.bat" /f %.%
for %%# in ("" "0pending" "1hide" "2unhide" "3apply") do reg delete "%menu%%%~#" /f %.%
for %%t in (refresh lists upgrades installs downloads service repair report speech search defender toggle renew remove) do (
schtasks /delete /tn "WUT\%%t" /f %.%
)
for %%t in (hide unhide apply) do for /l %%n in (101,1,116) do schtasks /delete /tn "WUT\%%t\%%n" /f %.%
for %%t in (hide unhide apply) do schtasks /delete /tn "WUT\%%t" /f %.%
schtasks /delete /tn "WUT" /f %.%
sc config wuauserv type= share depend= rpcss %.%
sc config TrustedInstaller type= own depend= / %.%
pushd %SystemRoot%
del /f /q WUT.bat WUT.old DefenderManualUpdate.bat WUTRefresh.bat WUTUndo.bat "%f0%" %.%
exit/b
:flip %1:exe
call :reg_query "%ifeo%\%~1.exe" Debugger block
if defined block (set "toggle=enabled") else set "toggle=blocked"
exit/b
:status %1:exe
call :reg_query "%ifeo%\%~1.exe" Debugger block
if defined block (set "toggle=blocked") else set "toggle=enabled"
exit/b
:reg_query %1:KeyName %2:ValueName %3:OutputVariable %4:other_options[example: "/t REG_DWORD"]
setlocal & for /f "skip=2 delims=" %%s in ('reg query "%~1" /v "%~2" /z 2^>nul') do set "rq=%%s" & call set "rv=%%rq:*) =%%"
endlocal & set "%~3=%rv%" & exit/b &rem AveYo: call :reg_query "HKCU\MyKey" "MyValue" MyVar
::---------------------------------------------------------------------------------------------------------------------------------
:JScript_functions AveYo: Switch syntax highlighter to 'javascript'
::-------------------------------------------------------------------------------------------------------------------------------*/
f0=WSH.ScriptFullName; run=WSH.Arguments(0); args=''; for(i=1;i<WSH.Arguments.length;i++) args+=' "'+WSH.Arguments(i)+'"';
function sex(exe,args){WSH.CreateObject('Shell.Application').ShellExecute(exe,args,'','',0);}; function reg(s){ sex('reg.exe',s); }
// Open external commands in new hidden cmd instance - backquotes replaced to quotes
if (run=='cmd') sex('cmd','/c '+args.replace(/`/g,'"'));
// Context menu entries trigger - elevated with no popups
if (run=='schtasks') sex('SCHTASKS.EXE','/Run /TN '+args);
// Shift to CMD if loaded by WScript - pass arguments, prevent loop, run as admin at setup, hide window at context-menu
function cmd(adm,win){WSH.CreateObject('Shell.Application').ShellExecute('cmd','/c call "'+f0+'" shift "'+f0+'"'+args,'',adm,win);}
if (run=='run') cmd('',1); if (run=='runhide') cmd('',0); if (run=='runas') cmd('runas',1); if (run=='runashide') cmd('runas',0);
if (run=='renew') {
// renew script over internet
try{
downloader=WSH.CreateObject("WinHttp.WinHttpRequest.5.1");
if (downloader===null) downloader=WSH.CreateObject("WinHttp.WinHttpRequest");
if (downloader===null) downloader=WSH.CreateObject("MSXML2.ServerXMLHTTP");
if (downloader===null) downloader=WSH.CreateObject("Microsoft.XMLHTTP");
downloader.Open("GET",WSH.Arguments(1),false); downloader.Send(); oASI=downloader.ResponseBody(); downloader=undefined;
oASO=WSH.CreateObject("ADODB.Stream"); oASO.type=1; oASO.Mode=3; oASO.Open; oASO.Write(oASI); oASI=undefined;
oASO.SaveToFile(WSH.Arguments(2)); oASO.Close();
}catch(e){} // supress all errors since we're working with com objects
}
// WUT Hide/Unhide/Apply lists
if (run=='WUTRefresh' || run=='hide' || run=='unhide' || run=='apply') {
SRP=GetObject("winmgmts:StdRegProv"); pending=SRP.GetStringValue(2147483650,'SOFTWARE\\WUT.bat','Pending');
if (pending===0) WSH.quit(); else SRP.SetStringValue(2147483650,'SOFTWARE\\WUT.bat','Pending','yes'); // prevent instances
k='HKCR\\DesktopBackground\\shell\\WUT'; hk=k+'1hide'; uk=k+'2unhide'; ik=k+'3apply'; pk=k+'0pending'; // set list keys
reg('delete "'+hk+'" /f'); reg('delete "'+uk+'" /f'); reg('delete "'+ik+'" /f'); // delete previous
reg('add "'+pk+'" /v MUIVerb /d "Pending.." /f'); reg('add "'+pk+'" /v SubCommands /d "" /f'); // add Pending.. entry
// Check for updates
count=0; wuthide=[]; wutunhide=[];
try{
session=WSH.CreateObject("Microsoft.Update.Session"); reboot=WSH.CreateObject("Microsoft.Update.SystemInfo").RebootRequired;
searcher=session.CreateUpdateSearcher();
sresult=searcher.Search("IsInstalled=0"); Updatelist=sresult.Updates; count=sresult.Updates.Count;
for(i=0;i<count;i++) {
itemTitle=Updatelist.Item(i).Title;
minsize=Updatelist.Item(i).MinDownloadSize; maxsize=Updatelist.Item(i).MaxDownloadSize; wutsize='';
if (maxsize > 1073741824) wutsize=' ['+Math.round(minsize/10737418.24)/100+' - '+Math.round(maxsize/10737418.24)/100+'GB]';
else if (maxsize > 1048576) wutsize=' ['+Math.round(minsize/10485.76)/100+' - '+Math.round(maxsize/10485.76)/100+'MB]';
else if (maxsize > 1024) wutsize=' ['+Math.round(minsize/10.24)/100+' - '+Math.round(maxsize/10.24)/100+'KB]';
else if (maxsize > 0) wutsize=' ['+(minsize)+' - '+(maxsize)+'B]';
wutTitle=Updatelist.Item(i).Title + wutsize;
if (run=='apply' && WSH.Arguments(1).indexOf(itemTitle) > -1) {
// Add matching entry to UpdateColl
UpdateColl=WSH.CreateObject("Microsoft.Update.UpdateColl"); UpdateColl.Add(Updatelist.Item(i));
// Download update
downloader=session.CreateUpdateDownloader(); downloader.Updates=UpdateColl; dresult=downloader.Download();
if (dresult.ResultCode==2) {
// Unblock apply
sex('sc','config TrustedInstaller type= own depend= /');
KeyPath='SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\wuauclt.exe';
SRP.DeleteKey(2147483650,KeyPath);
WSH.Sleep(1000);
//Apply update
installer=session.CreateUpdateInstaller(); installer.Updates=UpdateColl; iresult=installer.Install();
if (iresult.ResultCode==2) continue;
}
}
// hide and unhide are very simple bool flip compared to apply
if (run=='hide' && WSH.Arguments(1).indexOf(itemTitle) > -1) {
Updatelist.Item(i).IsHidden=true; wutunhide.push(wutTitle); continue;
}
if (run=='unhide' && WSH.Arguments(1).indexOf(itemTitle) > -1) {
Updatelist.Item(i).IsHidden=false; wuthide.push(wutTitle); continue;
}
// Trigger :update_defender to manually refresh definitions from MMPC
if (Updatelist.Item(i).IsHidden===false && itemTitle.indexOf('(Definition') > -1) {
sex('cmd','/c call "'+f0+'" update_defender');
}
// Sorting lists
if (Updatelist.Item(i).IsHidden) wutunhide.push(wutTitle); else wuthide.push(wutTitle);
}
// Generate Hide context menu
if (wuthide.length>0){
for(i=101,n=wuthide.length+101;i<n;i++) {
reg('add "'+hk+'\\shell\\'+i+'" /v MUIVerb /d "'+wuthide[i-101]+'" /f');
reg('add "'+hk+'\\shell\\'+i+'\\command" /ve /d "wscript.exe /e:JScript \\"'+f0+'\\" schtasks WUT\\hide\\'+i+'" /f');
}
reg('add "'+hk+'" /v SubCommands /d "" /f');
reg('add "'+hk+'" /v MUIVerb /d "Hide '+"\t"+wuthide.length+'" /f');
}
// Generate Unhide context menu
if (wutunhide.length>0){
for(i=101,n=wutunhide.length+101;i<n;i++) {
reg('add "'+uk+'\\shell\\'+i+'" /v MUIVerb /d "'+wutunhide[i-101]+'" /f');
reg('add "'+uk+'\\shell\\'+i+'\\command" /ve /d "wscript.exe /e:JScript \\"'+f0+'\\" schtasks WUT\\unhide\\'+i+'" /f');
}
reg('add "'+uk+'" /v SubCommands /d "" /f');
reg('add "'+uk+'" /v MUIVerb /d "Unhide '+"\t"+wutunhide.length+'" /f');
}
// Generate Apply context menu
if (wuthide.length>0){
for(i=101,n=wuthide.length+101;i<n;i++) {
reg('add "'+ik+'\\shell\\'+i+'" /v MUIVerb /d "'+wuthide[i-101]+'" /f');
reg('add "'+ik+'\\shell\\'+i+'\\command" /ve /d "wscript.exe /e:JScript \\"'+f0+'\\" schtasks WUT\\apply\\'+i+'" /f');
}
reg('add "'+ik+'" /v SubCommands /d "" /f');
reg('add "'+ik+'" /v MUIVerb /d "Apply '+"\t"+((reboot) ? 'must reboot' : wuthide.length)+'" /f');
}
}catch(e){} // supress all errors since we're working with com objects
reg('delete "'+pk+'" /f'); SRP.DeleteValue(2147483650,'SOFTWARE\\WUT.bat','Pending'); // Remove Pending.. temporary entry
}
//
最后更新为v10.0 final。上面的pastebin链接上的最新代码。
对于Windows 10家庭用户
从Windows Central尝试以下方法。基本上,您将禁用重新启动服务,而不是更新服务。然后,您可以随时重新启动。请注意,您需要管理员权限,但是由于您正在使用Windows Home Edition,因此我想您已经拥有该权限。
C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot
(假设您%windir%
是C:\
)到Reboot.old。 请注意,此处将要求您提供管理员访问权限。 Reboot
中的目录C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\
。这将防止Windows重新创建具有相同名称的文件。请注意,此处将要求您提供管理员访问权限。请注意,这不是Microsoft提倡的。但是话又说回来,两者都无法控制您自己的启动时间表,因此请使用该MS!认真地说,如果您不知道自己在做什么,则可以按照Internet上的任何指示来了解自己所承担的风险。这当然很简单,对Windows 95的理解将有助于解释这里发生的情况。
Windows Update的状态-从2019年开始
微软一直在竭尽全力使Windows Update成为必然,这就是为什么传统方法不再起作用或只能在有限的时间内起作用的原因。
Microsoft一直在添加无法禁用的系统服务,其目的是更新Windows。其中最主要的是 Update Orchestrator服务,其任务是下载,安装和验证更新。如果停止,计算机将无法再下载和安装更新,这就是为什么只能在当前会话中将其禁用,并在下次重新启动时将其重新启用的原因。
用于使Windows Update不可阻挡的服务是新的 Windows Update Medic Service,其任务是保持Windows Update正常运行。正是这项服务取消了阻止Windows Update的所有传统方法,因此,您将定期且意外地发现Windows Update设置已重置为其原始值,并且Windows已返回强制用户执行更新。
Windows Update Medic服务本身无法完全禁用。任何尝试都会以“访问被拒绝”消息结束。
但是,存在一种可以完全阻止Windows Update的第三方产品: Windows Update Blocker。该免费产品是便携式的,只需单击一下即可禁用/启用Windows Update。实际上,它也可以阻止任何其他不可阻止的Windows服务。据报道,它在2018年仍在工作。
从长远来看,使用第三方产品可能比依靠Windows半文档化功能(可能会在不另行通知的情况下进行更改)更可靠。 我的答案中可能找到更多免费产品 ,它们使用Windows API,该Windows API允许任何程序否决即将发生的关机。
在尝试了本书中的所有技巧之后,我总是被Windows Update所击败。我在这里尝试了所有解决方案以及其他大量资源,Windows不断找到方法来挫败我的计划。
直到大约6个月前...
我已经找到了永久禁用所有Windows更新的永久解决方案,而不管该服务或其他任何运行项如何。我已经在与许多不同事情有关的许多不同来源的帮助下找到了这种方法。总的来说,我自己是通过使用一点点其他信息来发现这种方法的,这些信息用来做与之无关的事情,但它确实有效。它的工作原理非常漂亮。
它基本上是Windows主机文件的增强版本,可让您添加通配符之类的功能,在我们的情况下这是必需的,因为Windows从其获取更新的来源很多。
0.0.0.0 windowsupdate.microsoft.com
0.0.0.0 * .windowsupdate.microsoft.com
0.0.0.0 * .update.microsoft.com
0.0.0.0 windowsupdate.com
0.0.0.0 * .windowsupdate.com
0.0.0.0 download.windowsupdate.com
download.microsoft.com为0.0.0.0
为0.0.0.0 * .download.windowsupdate.com
为0.0.0.0 wustat.windows.com
为0.0.0.0 ntservicepack.microsoft.com
为0.0.0.0 stats.microsoft.com
现在文件的底部应如下所示。保存并关闭文件。
已完成
现在,您的Acrylic伙伴应该支持您,并始终密切关注Microsoft的“老大哥”策略,以确保他们不会强迫可怜的老用户安装至少完全破坏PC的更新,因为它们至少有四分之一的时间在家用PC和Surface Pro (应该是Windows的PC BUILT)上都做到了吗?Cmon,微软!
ping Windowsupdate.microsoft.com
如果这些是您的结果,那么从现在开始您将成为黄金!!
注意:根据我的经验,这丝毫没有降低我的PC的速度。除了向Windows用于更新或检查更新的源发出请求外,它也不会重新路由任何Internet流量,因此非常类似于hosts文件。它还使用与主机文件基本相同的格式。这也成功禁用了Windows一直放置在我的计算机上的垃圾的重新安装,该垃圾使巨大的彩色屏幕显示诸如“您必须更新或计算机将崩溃”之类的内容。显然,我不记得警告的意思,因为距我收到警告已经很久了(由于成功成功阻止了大约6个月),但这是我所见过的最烦人的事情。
services.msc
就我而言,我不仅要控制Windows Updates何时发布,还希望限制所有已安装的应用程序不受其在线更新的控制。
因此,我简单的一站式解决方案是:1.在路由器端将主机的Internet访问设置为B。主机上安装的程序或服务均无法访问Internet。原因Windows Updates也被阻止。
大多数应用程序都支持基于应用程序的代理设置,例如Chrome,Firefox,All of Games等。
通过执行这些操作,您自己对计算机的Internet访问进行了极大的控制,没有人会惹上您。
每当您要更新Windows时,请设置“控制面板” |“控制面板”。Internet选项以使用本地代理,因此Windows可以更新您的操作系统。之后,立即关闭全局代理以将您的计算机重新设置为安静的世界。
2年后,由于Microsoft的更新机制而丢失了数十亿未保存的作品,终于有了一个解决该问题的重大更新。
Windows 10 Creators Update现在可用(直接下载)
安装更新后,用户最终将再次询问(例如20年前微不足道的那些)他/他是否希望应用该更新:
有时我想知道是谁做出了这些决定...
更新后,您将有更多关于更新时间的选项。要停止它们,请转至Windows更新设置>高级选项>暂停更新>开。
在“重新启动选项”下,您还可以找到更新通知的新选项:
(以管理员身份运行PowerShell)
Clear-Host
$WindowsUpdatePath = "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\"
$AutoUpdatePath = "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"
If(Test-Path -Path $WindowsUpdatePath) {
Remove-Item -Path $WindowsUpdatePath -Recurse
}
New-Item $WindowsUpdatePath -Force
New-Item $AutoUpdatePath -Force
Set-ItemProperty -Path $AutoUpdatePath -Name NoAutoUpdate -Value 1
Get-ScheduledTask -TaskPath "\Microsoft\Windows\WindowsUpdate\" | Disable-ScheduledTask
takeown /F C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator /A /R
icacls C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator /grant Administrators:F /T
Get-ScheduledTask -TaskPath "\Microsoft\Windows\UpdateOrchestrator\" | Disable-ScheduledTask
Stop-Service wuauserv
Set-Service wuauserv -StartupType Disabled
Write-Output "All Windows Updates were disabled"
虽然我在“服务和组策略编辑器”中禁用了更新,但仍会不时重新打开。然后,我必须在服务中手动将其关闭。通过GUI这样做很麻烦,因此我编写了一个批处理脚本。它停止并禁用Background Intelligent Transfer Service
和Windows Update
。
@echo off
net stop wuauserv
net stop BITS
sc config wuauserv start= disabled
sc config BITS start= disabled
pause
我还使用(不是专门用于此目的)轻型网络监视工具(带宽监视器),所以我知道何时有活动(系统任务栏上的图标)。如果我不应该进行任何活动,那么我知道Windows Update已重新打开。然后我运行脚本,然后将其关闭。