Add option to fully disable ms-gamebar and ms-gamingoverlay popups #367

This commit is contained in:
Raphire
2025-11-29 17:15:12 +01:00
parent 186a2f08b7
commit 8b2cadb37d
8 changed files with 71 additions and 22 deletions

View File

@@ -17,7 +17,7 @@ param (
[switch]$RemoveW11Outlook, [switch]$RemoveW11Outlook,
[switch]$ForceRemoveEdge, [switch]$ForceRemoveEdge,
[switch]$DisableDVR, [switch]$DisableDVR,
[switch]$DisableControllerOverlay, [switch]$DisableGameBarIntegration,
[switch]$DisableTelemetry, [switch]$DisableTelemetry,
[switch]$DisableFastStartup, [switch]$DisableFastStartup,
[switch]$DisableModernStandbyNetworking, [switch]$DisableModernStandbyNetworking,

View File

@@ -1,5 +0,0 @@
Windows Registry Editor Version 5.00
; Disable allow your controller to open Game Bar
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\GameBar]
"UseNexusForGameBarEnabled"=dword:00000000

View File

@@ -0,0 +1,22 @@
Windows Registry Editor Version 5.00
; Disable allow your controller to open Game Bar
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\GameBar]
"UseNexusForGameBarEnabled"=dword:00000000
; Disable `ms-gamebar` popups
[HKEY_CLASSES_ROOT\ms-gamebar]
@="URL:ms-gamebar"
"URL Protocol"=""
"NoOpenWith"=""
[HKEY_CLASSES_ROOT\ms-gamebar\shell\open\command]
@="%SystemRoot%/System32/systray.exe"
[HKEY_CLASSES_ROOT\ms-gamebarservices]
@="URL:ms-gamebar"
"URL Protocol"=""
"NoOpenWith"=""
[HKEY_CLASSES_ROOT\ms-gamebarservices\shell\open\command]
@="%SystemRoot%/System32/systray.exe"

View File

@@ -1,5 +0,0 @@
Windows Registry Editor Version 5.00
; Disable allow your controller to open Game Bar
[hkey_users\default\SOFTWARE\Microsoft\GameBar]
"UseNexusForGameBarEnabled"=dword:00000000

View File

@@ -0,0 +1,22 @@
Windows Registry Editor Version 5.00
; Disable allow your controller to open Game Bar
[hkey_users\default\SOFTWARE\Microsoft\GameBar]
"UseNexusForGameBarEnabled"=dword:00000000
; Disable `ms-gamebar` popups
[HKEY_CLASSES_ROOT\ms-gamebar]
@="URL:ms-gamebar"
"URL Protocol"=""
"NoOpenWith"=""
[HKEY_CLASSES_ROOT\ms-gamebar\shell\open\command]
@="%SystemRoot%/System32/systray.exe"
[HKEY_CLASSES_ROOT\ms-gamebarservices]
@="URL:ms-gamebar"
"URL Protocol"=""
"NoOpenWith"=""
[HKEY_CLASSES_ROOT\ms-gamebar\shell\open\command]
@="%SystemRoot%/System32/systray.exe"

View File

@@ -1,5 +0,0 @@
Windows Registry Editor Version 5.00
; Enable allow your controller to open Game Bar
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\GameBar]
"UseNexusForGameBarEnabled"=dword:00000001

View File

@@ -0,0 +1,20 @@
Windows Registry Editor Version 5.00
; Enable allow your controller to open Game Bar
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\GameBar]
"UseNexusForGameBarEnabled"=dword:00000001
; Enable `ms-gamebar` popups
[HKEY_CLASSES_ROOT\ms-gamebar]
@="URL:ms-gamebar"
"URL Protocol"=""
"NoOpenWith"=-
[-HKEY_CLASSES_ROOT\ms-gamebar\shell\open\command]
[HKEY_CLASSES_ROOT\ms-gamebarservices]
@="URL:ms-gamebar"
"URL Protocol"=""
"NoOpenWith"=-
[-HKEY_CLASSES_ROOT\ms-gamebar\shell\open\command]

View File

@@ -19,7 +19,7 @@ param (
[switch]$RemoveW11Outlook, [switch]$RemoveW11Outlook,
[switch]$ForceRemoveEdge, [switch]$ForceRemoveEdge,
[switch]$DisableDVR, [switch]$DisableDVR,
[switch]$DisableControllerOverlay, [switch]$DisableGameBarIntegration,
[switch]$DisableTelemetry, [switch]$DisableTelemetry,
[switch]$DisableFastStartup, [switch]$DisableFastStartup,
[switch]$DisableModernStandbyNetworking, [switch]$DisableModernStandbyNetworking,
@@ -991,7 +991,7 @@ function DisplayCustomModeOptions {
AddParameter 'RemoveW11Outlook' 'Remove the new Outlook for Windows app' AddParameter 'RemoveW11Outlook' 'Remove the new Outlook for Windows app'
AddParameter 'RemoveGamingApps' 'Remove the Xbox App and Xbox Gamebar' AddParameter 'RemoveGamingApps' 'Remove the Xbox App and Xbox Gamebar'
AddParameter 'DisableDVR' 'Disable Xbox game/screen recording' AddParameter 'DisableDVR' 'Disable Xbox game/screen recording'
AddParameter 'DisableControllerOverlay' 'Disable opening the Xbox Game Bar with a controller' AddParameter 'DisableGameBarIntegration' 'Disable Game Bar integration'
} }
'3' { '3' {
Write-Output "You have selected $($script:SelectedApps.Count) apps for removal" Write-Output "You have selected $($script:SelectedApps.Count) apps for removal"
@@ -1000,9 +1000,9 @@ function DisplayCustomModeOptions {
Write-Output "" Write-Output ""
if ($( Read-Host -Prompt "Disable Game Bar integration for controller and game/screen recording? This also stops msgaming overlay popups (y/n)" ) -eq 'y') { if ($( Read-Host -Prompt "Disable Game Bar integration and game/screen recording? This also stops ms-gamingoverlay and ms-gamebar popups (y/n)" ) -eq 'y') {
AddParameter 'DisableDVR' 'Disable Xbox game/screen recording' AddParameter 'DisableDVR' 'Disable Xbox game/screen recording'
AddParameter 'DisableControllerOverlay' 'Disable opening the Xbox Game Bar with a controller' AddParameter 'DisableGameBarIntegration' 'Disable Game Bar integration'
} }
} }
} }
@@ -1811,8 +1811,8 @@ switch ($script:Params.Keys) {
RegImport "> Disabling Xbox game/screen recording..." "Disable_DVR.reg" RegImport "> Disabling Xbox game/screen recording..." "Disable_DVR.reg"
continue continue
} }
'DisableControllerOverlay' { 'DisableGameBarIntegration' {
RegImport "> Disabling the option of opening the Xbox Game Bar with a controller..." "Disable_Controller_Game_Bar_Integration.reg" RegImport "> Disabling the option of opening the Xbox Game Bar with a controller..." "Disable_Game_Bar_Integration.reg"
continue continue
} }
'DisableTelemetry' { 'DisableTelemetry' {