Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Xinput ms-gamebar popup fix

Fixes the "We can't open this 'ms-gamebar' link" / "Pick an app" popup that appears every time an Xinput controller is connected on Windows installs that don't have the Xbox Game Bar app.

What it does

  1. Redirects the ms-gamebar and ms-gamebarservices protocol handlers to a harmless no-op (systray.exe) instead of a missing app, so Windows "opens" the link silently instead of throwing an error.
  2. Disables the activation of GameBarPresenceWriter.exe, which otherwise re-registers those same protocols back to the missing app every time a controller reconnects, undoing step 1.

Step 2 requires taking ownership of a registry key protected by TrustedInstaller. Doing that requires enabling SeTakeOwnershipPrivilege first — being an administrator alone is not enough, Windows disables that privilege by default even in an elevated process.

Files

  • fix_xinput_gamebar_popup.bat — run this one. Self-elevates via UAC.
  • take_ownership_presencewriter.ps1 — plain-text version of the PowerShell code that's embedded as base64 inside the .bat (via -EncodedCommand). Included so you can read exactly what runs before trusting the .bat.

Heads-up: antivirus / SmartScreen

The .bat self-elevates via UAC and runs a base64-encoded PowerShell block. That combination (base64 + auto-elevation) is a common pattern in malicious scripts too, so Windows Defender or SmartScreen may flag it. Read take_ownership_presencewriter.ps1 first if you want to verify it's exactly what's encoded in the .bat before running it.

Usage

Double-click fix_xinput_gamebar_popup.bat, accept the UAC prompt. No further input needed. A reboot (or at least log off/on) is recommended afterward so the COM activation cache clears.

About

Fixes the "We can't open this 'ms-gamebar' link" / "Pick an app" popup that appears every time an Xinput controller is connected on Windows installs that don't have the Xbox Game Bar app.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors