📊 VBA (Excel)
Apply Disable Xbox Game Bar Capture (VBA)
Disables background game/app capture via the Xbox Game Bar. Applied via WScript.Shell.RegWrite from VBA.
DisableGameBarRegSet.bas
Attribute VB_Name = "DisableGameBarRegSet"
Option Explicit
Public Sub DisableGameBarRegSet()
Dim wsh As Object
Dim regPath As String
Set wsh = CreateObject("WScript.Shell")
regPath = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\GameDVR\AppCaptureEnabled"
wsh.RegWrite regPath, 0, "REG_DWORD"
MsgBox "Disable Xbox Game Bar Capture applied." & vbCrLf & regPath, vbInformation
End Sub