禁用 Windows 10 更新通知 OSD

禁用 Windows 10 更新通知 OSD

在 Windows 10 中,它时不时会用屏幕显示 (OSD) 来抓取我的屏幕,并告诉我有关更新的信息,同时按下按钮即可进入“设置”中的更新菜单。有时这非常烦人,尤其是当我全屏显示某个应用时,它就会将我带离该应用,只是为了告诉我有关更新的信息。

我想禁用此屏幕抓取 OSD 通知,因为它太过突兀,简直令人厌烦。我更希望它能以小弹出气球通知的形式通知我,这样我就可以在消息中心查看它。

我对一些注册表调整或其他操作没有意见,要么这样做,要么完全禁用更新通知。我目前只让它通知更新,但不会让它随时下载和安装更新。

答案1

windows_update_notification_only_toggle.bat

仅通知子集仅阻止烦人的通知和重启任务,同时保持更新功能启用并正常运行。

要撤消更改并恢复 Windows 更新通知,只需再次运行脚本。

windows_update_notification_only_toggle.bat

goto="init" /* %~nx0
:: Batch designed for Windows 10 - compatible with Windows 7
:: v7 final: Disable Update Notification-only with working Windows Update, Store and Defender protection updates
::----------------------------------------------------------------------------------------------------------------------------------
:about
::----------------------------------------------------------------------------------------------------------------------------------
call :check_status
if "%STATUS%"=="DISABLED" ( color 0c ) else color 0b
echo.
echo      ---------------------------------------------------------------------
echo     :            Windows Update Notification-only Toggle v7.0             :
echo     :---------------------------------------------------------------------:
echo     :           Just run this script again to enable or disable           :
echo     :                                                                     :
echo     :               Update Notification currently %STATUS%                :
echo     :                                                                     :
echo     : Press Alt+F4 to cancel                    Always run latest version :
echo      ---------------------------------------------------------------------
echo       A subset of windows_update_toggle.bat https://pastebin.com/gNsLEWJe
echo.
exit/b
::----------------------------------------------------------------------------------------------------------------------------------
:main [ Batch main function ]
::----------------------------------------------------------------------------------------------------------------------------------
set "exe=" & title Windows Update Notification Toggle & color 07 & call :about 0b & timeout /t 10
:: notification blocking
set "exe=%exe% MusNotification MusNotifyIcon"                       || Tasks\Microsoft\Windows\UpdateOrchestrator       ESSENTIAL!  
set "exe=%exe% UpdateNotificationMgr UNPUXLauncher UNPUXHost"       || Tasks\Microsoft\Windows\UNP
set "exe=%exe% Windows10UpgraderApp DWTRIG20 DW20 GWX"              || Windows10Upgrade
:: error reporting blocking
set "exe=%exe% wermgr WerFault WerFaultSecure DWWIN"                || Tasks\Microsoft\Windows\Windows Error Reporting
:: diag - optional blocking of diagnostics / telemetry
rem set "exe=%exe% compattelrunner"                                 || Tasks\Microsoft\Windows\Application Experience
rem set "exe=%exe% dstokenclean appidtel"                           || Tasks\Microsoft\Windows\ApplicationData
rem set "exe=%exe% wsqmcons"                                        || Tasks\Microsoft\Windows\Customer Experience Improvement Prg
rem set "exe=%exe% dusmtask"                                        || Tasks\Microsoft\Windows\DUSM
rem set "exe=%exe% dmclient"                                        || Tasks\Microsoft\Windows\Feedback\Siuf
rem set "exe=%exe% DataUsageLiveTileTask"                           || Tasks\{SID}\DataSenseLiveTileTask
rem set "exe=%exe% DiagnosticsHub.StandardCollector.Service"        || System32\DiagSvcs
rem set "exe=%exe% HxTsr"                                           || WindowsApps\microsoft.windowscommunicationsapps
:: other - optional blocking of other tools
rem set "exe=%exe% PilotshubApp"                                    || Program Files\WindowsApps\Microsoft.WindowsFeedbackHub_
rem set "exe=%exe% SpeechModelDownload SpeechRuntime"               || Tasks\Microsoft\Windows\Speech                  Recommended
rem set "exe=%exe% LocationNotificationWindows WindowsActionDialog" || Tasks\Microsoft\Windows\Location
rem set "exe=%exe% DFDWiz disksnapshot"                             || Tasks\Microsoft\Windows\DiskFootprint
::----------------------------------------------------------------------------------------------------------------------------------
:: all_entries - used to cleanup orphaned / commented entries between script versions
set e1=TiWorker UsoClient wuauclt wusa WaaSMedic SIHClient WindowsUpdateBox GetCurrentRollback WinREBootApp64 WinREBootApp32
set e2=MusNotification MusNotifyIcon UpdateNotificationMgr UNPUXLauncher UNPUXHost Windows10UpgraderApp DWTRIG20 DW20 GWX wuapihost
set e3=wermgr WerFault WerFaultSecure DWWIN compattelrunner dstokenclean appidtel wsqmcons dusmtask dmclient DataUsageLiveTileTask
set e4=DiagnosticsHub.StandardCollector.Service HxTsr PilotshubApp SpeechModelDownload SpeechRuntime LocationNotificationWindows
set e5=WindowsActionDialog DFDWiz disksnapshot TrustedInstaller
set old_entries=RAServer ClipUp Dism ShellServiceHost backgroundTaskHost
set all_entries=%e1% %e2% %e3% %e4% %e5%
:: Cleanup orphaned / commented items between script versions
echo.
for %%C in (%old_entries%) do call :cleanup_orphaned %%C silent
for %%C in (%all_entries%) do call :cleanup_orphaned %%C
echo.
:: Toggle execution via IFEO
set/a "bl=0" & set/a "unbl=0" & set "REGISTRY_MISMATCH=echo [REGISTRY MISMATCH CORRECTED] & echo."
for %%a in (%exe%) do call :ToggleExecution "%ifeo%\%%a.exe"
if %bl% gtr 0 if %unbl% gtr 0 %REGISTRY_MISMATCH% & for %%a in (%exe%) do call :ToggleExecution "%ifeo%\%%a.exe" forced
echo.

:: Done!
echo ---------------------------------------------------------------------
if "%STATUS%"=="DISABLED" ( color 0b &echo  Update Notification now ENABLED! ) else color 0c &echo  Update Notification now DISABLED
echo ---------------------------------------------------------------------
echo.
pause
exit

::----------------------------------------------------------------------------------------------------------------------------------
:: Utility functions
::----------------------------------------------------------------------------------------------------------------------------------
:check_status
set "ifeo=HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options" & set "OK="
reg query "%ifeo%\MusNotification.exe" /v Debugger 1>nul 2>nul && set "STATUS=DISABLED" || set "STATUS=ENABLED!"
exit/b

:cleanup_orphaned %1:[entry to check, used internally] %2:[anytext=silent]
call set "orphaned=%%exe:%1=%%" & set "okey="%ifeo%\%1.exe""
if /i "%orphaned%"=="%exe%" reg delete %okey% /v "Debugger" /f >nul 2>nul & if /i ".%2"=="." echo %1 not selected.. 
exit/b

:ToggleExecution %1:[regpath] %2:[optional "forced"]
set "dummy=%windir%\System32\systray.exe" & rem allow dummy process creation to limit errors
if "%STATUS%_%2"=="DISABLED_forced" reg delete "%~1" /v "Debugger" /f >nul 2>nul & exit/b
if "%STATUS%_%2"=="ENABLED!_forced" reg add "%~1" /v Debugger /d "%dummy%" /f >nul 2>nul & exit/b
reg query "%~1" /v Debugger 1>nul 2>nul && set "isBlocked=1" || set "isBlocked="
if defined isBlocked reg delete "%~1" /v "Debugger" /f >nul 2>nul & set/a "unbl+=1" & echo %~n1 un-blocked! & exit/b 
reg add "%~1" /v Debugger /d "%dummy%" /f >nul 2>nul & set/a "bl+=1" & echo %~n1 blocked! & taskkill /IM %~n1 /t /f >nul 2>nul
exit/b

::----------------------------------------------------------------------------------------------------------------------------------
:"init" [ Batch entry function ]
::----------------------------------------------------------------------------------------------------------------------------------
@echo off & cls & setlocal & if "%1"=="init" shift &shift & goto :main &rem Admin self-restart flag found, jump to main
reg query "HKEY_USERS\S-1-5-20\Environment" /v temp 1>nul 2>nul && goto :main || call :about 0c & echo  Requesting admin rights..
call cscript /nologo /e:JScript "%~f0" get_rights "%1" & exit
::----------------------------------------------------------------------------------------------------------------------------------
*/ // [ JScript functions ] all batch lines above are treated as a /* js comment */ in cscript
function get_rights(fn) { var console_init_shift='/c start "init" "'+fn+'"'+' init '+fn+' '+WSH.Arguments(1);
  WSH.CreateObject("Shell.Application").ShellExecute('cmd.exe',console_init_shift,"","runas",1); }
if (WSH.Arguments.length>=1 && WSH.Arguments(0)=="get_rights") get_rights(WSH.ScriptFullName);
//

答案2

MusNotifyIcon.exe可以通过重定向来自和到虚拟可执行文件的调用来禁用图标和通知MusNotification.exe。这可以通过创建特定的注册表项来实现,这本质上就是神秘的批处理脚本做。

在提升的命令提示符中运行以下几行:

reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\MusNotifyIcon.exe" /v "Debugger" /t REG_SZ /d "%windir%\System32\systray.exe" /f
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\MusNotification.exe" /v "Debugger" /t REG_SZ /d "%windir%\System32\systray.exe" /f
taskkill /IM MusNotifyIcon.exe /t /f
taskkill /IM MusNotification.exe /t /f

答案3

进入“设置”并选择“系统”。在左侧单击“通知和操作”。

向下滚动到窗口底部并单击 Windows Update(应该是最后一个)以查看其他选项。

您可以在此处禁用 Windows 更新通知横幅。这样,通知将仅在操作中心中可见。

Windows 更新通知选项

答案4

Windows 10 版本 1909 具有以下高级设置:

Windows 更新设置 高级 Windows 更新选项

禁用更新通知会保留不显眼的通知区域图标,但却摆脱了烦人的弹出窗口。

相关内容