1

I really need to disable the Xbox Game Bar with PowerShell. There are many articles on how to delete/uninstall the Xbox Game Bar but that does not work for me as I need this inside Windows Sandbox (where uninstalling it is impossible).

The reason for this is that the Game Bar keeps throwing an error You'll need a new app to open this ms-gamingoverlay link whenever certain apps are opened, and as Windows Sandbox is pristine each time it is opened, I will get this error over and over until I can disable it somehow.

Hence, I would really appreciate a way to disable this via PowerShell so that I can put that into my Startup script.

YorSubs
  • 669
  • 7
  • 23
  • 1
    I am not sure I understand your question. Uninstall through PowerShell uses the same mechanisms that are preventing you from uninstalling it within Windows Sandbox. Have you considered repairing the Xbox Game Bar association and preventing the error altogether? You shouldn't be getting the error, even if you are, using Windows Sandbox. I have good reasons to believe that running `Add-AppxPackage -DisableDevelopmentMode -Register "C:\Program Files\WindowsApps\Microsoft.XboxGameCallableUI_cw5n1h2txyewy\AppXManifest.xml"` will act like `Reset-AppxPackage` that only exists on Windows 11. – Ramhound Sep 21 '22 at 20:54
  • 1
    [My assumption is based on the fact on Windows 11 this would be an easy problem to solve](https://superuser.com/questions/1670249/you-will-need-a-new-app-to-open-this-windows-defender-link/1670370#1670370) – Ramhound Sep 21 '22 at 20:55
  • As far as I understand it, it is impossible to manipulate any Store App inside Microsoft's Windows Sandbox. `Add-AppxPackage` is available, but I get the following error on that command `Add-AppxPackage : Cannot find path 'C:\Program Files\WindowsApps\Microsoft.XboxGameCallableUI_cw5n1h2txyewy\AppXManifest.xml' because it does not exist.`. So Xbox Game Bar is still on the system, but semi-non-functional. – YorSubs Sep 21 '22 at 20:56
  • 1
    The only way to disable Xbox Game Bar is through Settings or by removing it entirely. My suggestion was fix the underline problem on the physical installation itself. I might be going down an incorrect path in my thought process. I cannot evidence that there is a reason the Xbox Game Bar, shouldn't work properly within Windows Sandbox. – Ramhound Sep 21 '22 at 21:00
  • "The only way". Well, I've had people say that to me quite a few times on this forum, only for someone to come in and say "well, this is easy, you just do x, y, z". I do agree with you that it might be that these are the only ways (I've been hunting for a way to do this for days). Windows Sandbox is so useful and I'm using it for a lot now; this is one of the final issues that I would like to resolve... hopefully there is a way. – YorSubs Sep 21 '22 at 21:20
  • Are you getting the `ms-gamingoverlay` error outside of Windows Sandbox? – Ramhound Sep 21 '22 at 21:31
  • No, outside of Windows Sandbox, I never see this error. – YorSubs Sep 22 '22 at 05:14

1 Answers1

2

These are the two powershell commands that disable Gamebar via the registry in powershell in Windows 10:

Set-ItemProperty -Path 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\GameDVR' -Name 'AppCaptureEnabled' -Value 0
Set-ItemProperty -Path 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\GameDVR' -Name 'HistoricalCaptureEnabled' -Value 0

I cannot be sure if the folder structure is the same within Windows Sandbox though.

Here is my source of information.

Mastaxx
  • 1,040
  • 8
  • 19
  • 1
    Incredible, this actually works! Thankyou sir, I've been looking for a way to do this for over a week without any luck ... I did have to add `Microsoft.PowerShell.Core\Registry::` before `HKEY` on both lines, but amazingly, the `ms-gamingoverlay` error has now stopped and when I go to Settings inside the Windows Sandbox, the Game Bar is showing as Disabled. Really grateful for this. – YorSubs Sep 22 '22 at 16:11