-
-
Save empjustine/3239c78a2f261fd7cd93a02546d7eacf to your computer and use it in GitHub Desktop.
俺のタイミングで更新させろ!それ以外は何もするな!何もするな!!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sc config wuauserv start= disabled | |
net stop wuauserv & REM Windows Update | |
net stop appidsvc | |
net stop BITS & REM Background Intelligent Transfer Service | |
net stop UsoSvc & REM Update Orchestrator Service for Windows Update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Dim wsh, svList, svInfo | |
Dim scPath, query, scMode | |
scPath = "%WINDIR%\System32\sc.exe" | |
query = "SELECT * FROM Win32_Service WHERE Name='wuauserv'" | |
Set svList = GetObject("winmgmts:").ExecQuery(query) | |
For Each svInfo In svList | |
scMode = svInfo.StartMode | |
Next | |
Set wsh = WScript.CreateObject("WScript.Shell") | |
wsh.Run scPath & " stop wuauserv", 0 | |
wsh.Run scPath & " stop UsoSvc", 0 | |
If scMode <> "Disabled" Then | |
wsh.Run scPath & " config wuauserv start=disabled", 0 | |
wsh.Run scPath & " config UsoSvc start=disabled", 0 | |
Else | |
wsh.Run scPath & " config wuauserv start=demand", 0 | |
wsh.Run scPath & " config UsoSvc start=demand", 0 | |
End If |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment