首先声明,这个是在吾爱破解上看到的。实现原理是利用vbs脚本提供建议对话框,然后通过用户的选择,执行对应的修改注册表操作。所以不要怕会搞坏,你能把系统搞崩都搞不坏Windows更新。
将下面的脚本内容复制,保存为vbs扩展名的脚本文件即可,注意由于编码问题,中文可能乱码,建议使用GB2312编码,或者utf-16,utf-8不行。
复制
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
评论 (0)