PythonBaby

导航

禁用windows自动更新

系统设置只能短时间内展厅Windows更新,停止服务或者修改注册表重启之后还是会被系统改回,那就让魔法打败魔法吧,创建个开机任务自动禁用。

schtasks /create /sc onstart /tn "stop windows update" /tr "net stop wuauserv"
schtasks /create /sc onstart /tn "disabled windows update" /tr "sc config wuauserv start=disabled"
schtasks /create /sc onstart /tn "stop Orchestrator" /tr "net stop UsoSvc"
schtasks /create /sc onstart /tn "disabled Orchestrator" /tr "sc config UsoSvc start=disabled"

将上面四行代码保存为.bat或者.cmd文件,然后运行(注意:如果装了杀毒软件请选择允许操作)。

上面四行功能是添加四项计划任务,分别是:停止windows update、禁用windows update、停止Orchestrator、禁用Orchestrator

schtasks参数解释如下:
  • /create 表示创建一个新任务。

  • /sc onstart 表示触发条件为系统启动时。

  • /tn 后跟任务的名称。

  • /tr 后跟要运行的程序或脚本。

posted on 2024-06-11 15:39  PythonBaby  阅读(2)  评论(0编辑  收藏  举报