释放双眼,带上耳机,听听看~!
VBS截图
使用截图
VBS脚本
' 管理Win10自动更新v3.vbs. Const usosvc_reg = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usosvc" Set fso = createobject("scripting.filesystemobject") Set shell = createobject("wscript.shell") curdir = fso.getparentfoldername(wscript.scriptfullname) If wscript.arguments.count = 0 Then Set sh = createobject("shell.application") sh.shellexecute wscript.fullname,"""" & wscript.scriptfullname & """ -admin",,"runas" ElseIf wscript.arguments.count = 1 And wscript.arguments(0) = "-admin" Then run Else msgbox "脚本启动参数错误!" End If Sub Run() Do ret = inputbox("1. 禁止Win10自动更新;" & vbcrlf & _ "2. 恢复Win10自动更新;" & vbcrlf & _ vbcrlf & _ "请输入序号:","管理Win10自动更新v3","1") Select Case ret Case "1" retnum = shell.run("sc.exe stop usosvc",0,True) shell.regwrite usosvc_reg & "\WOW64",&H14c,"REG_DWORD" msgbox "已禁止Win10自动更新!",vbexclamation Exit Do Case "2" shell.regdelete usosvc_reg & "\WOW64" retnum = shell.run("sc.exe start usosvc",0,True) msgbox "已恢复Win10自动更新!",vbexclamation Exit Do Case "" Exit Do Case Else msgbox "输入错误!请重新输入!",vbcritical End Select Loop End Sub
使用说明
- 复制VBS脚本至记事本
- 点击【文件】→【另存为】
- 文件类型【所有】,后缀改【vbs】
- 然后双击打开vbs文件,就能一键开启或关闭win10更新了!
- 输入“1”是关闭更新,“2”是开启更新