很明显,通过“HideWindowsUpdates.vbs KB号”即可隐藏指定KB号的更新,结合这篇文章《How to disable the “Get Windows 10” icon shown in the notification area (tray)?》,最终我编写的批处理如下:
@ECHO OFF
ECHO Welcome to use GWX - Get Windows 10 Removal Tool
ECHO For more information please visit http://wangye.org
ECHO.
REM See http://stackoverflow.com/questions/4051883/batch-script-how-to-check-for-admin-rights
goto check_Permissions
:check_Permissions
echo Administrative permissions required. Detecting permissions...
net session >nul 2>&1
if %errorLevel% == 0 (
echo Success: Administrative permissions confirmed.
) else (
echo Failure: Current permissions inadequate.
GOTO Done
)
ECHO Terminating process GWX.exe....
taskkill /F /IM GWX.exe
ECHO GWX.exe terminated.
ECHO Uninstalling KB3035583 Update, Please wait...
start "title" /b /wait WUSA.exe /quiet /norestart /uninstall /kb:3035583
ECHO KB3035583 uninstalled.
ECHO Adding Policy For Disable Gwx Software...
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Gwx" /v DisableGwx /t REG_DWORD /d 1 /f
ECHO DisableGwx Policy Added.
ECHO Removing GWX directory...
del /f /s /a /q %SystemRoot%\System32\GWX
ECHO GWX directory removed.
ECHO Hiding GWX Updates, Please wait...
start "title" /b /wait cscript.exe //NoLogo "%~dp0HideWindowsUpdates.vbs" 3035583
ECHO Done.
ECHO All steps completed, Please restart your computer!
:Done
PAUSE
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/tongxinshuyu/article-46351-2.html
这样不好吧
去不了好想去我凡~