You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

求助:制作修改Windows Update服务注册表路径的BAT文件

Fixing Windows 10 Update Disabling via Batch File (Registry Method)

Hey there! Let's break down what went wrong with your original command, then build a working batch file that properly disables Windows Update services—perfect for a beginner to follow.

What Was Wrong With Your Original Command?

Your REG ADD command had two key issues that made it fail:

  1. Leading backslash: The registry path shouldn't start with \—it should be HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wuauserv instead of \HKEY_LOCAL_MACHINE....
  2. Invalid ImagePath value: You added an extra XX in svchost.exeXX—the correct path for the Windows Update service is %systemroot%\system32\svchost.exe -k netsvcs.

That said, modifying the ImagePath isn't the most reliable way to disable the service. Instead, we should directly set the service's startup type to Disabled via the registry (and stop the service first if it's running).

Working Batch File to Disable Windows Update

Create a new text file, rename it to DisableWindowsUpdate.bat, then paste the following code:

@echo off
echo Stopping Windows Update-related services...
net stop wuauserv
net stop usosvc
net stop cryptsvc

echo Disabling services via registry...
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wuauserv" /v Start /t REG_DWORD /d 4 /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usosvc" /v Start /t REG_DWORD /d 4 /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\cryptsvc" /v Start /t REG_DWORD /d 4 /f

echo Windows Update services have been disabled successfully!
pause

What Each Part Does:

  • net stop [service]: Stops running update-related services first—if a service is active, modifying its registry settings might not take effect immediately.
  • reg add ... /v Start /t REG_DWORD /d 4: Sets the service's startup type to Disabled (the value 4 is the standard registry code for disabled Windows services).
  • /f: Forces the registry change without prompting for confirmation, so the script runs smoothly.

How to Use It:

  1. Right-click the DisableWindowsUpdate.bat file.
  2. Select Run as administrator (you need admin rights to modify system services and the HKEY_LOCAL_MACHINE registry hive—this is non-negotiable!).
  3. Wait for the script to finish; you'll see a confirmation message when it's done.

Quick Note for Re-Enabling Updates:

If you ever need to turn updates back on, just change the 4 in the reg add commands to 2 (this sets the service to start automatically), then re-run the script as admin. You can also add net start wuauserv and similar lines to restart the services right away.

内容的提问来源于stack exchange,提问作者Silvio Pereira

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 10:00:56