📊 VBA (Excel)
Check Disable Xbox Game Bar Capture Registry Value (VBA)
Reads the Disable Xbox Game Bar Capture registry value via WScript.Shell.RegRead and reports it in a message box — no PowerShell or reg.exe needed.
DisableGameBarRegCheck.bas
Attribute VB_Name = "DisableGameBarRegCheck"
Option Explicit
Public Sub DisableGameBarRegCheck()
Dim wsh As Object
Dim regPath As String
Dim value As Variant
Set wsh = CreateObject("WScript.Shell")
regPath = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\GameDVR\AppCaptureEnabled"
On Error Resume Next
value = wsh.RegRead(regPath)
On Error GoTo 0
If IsEmpty(value) Then
MsgBox "Value not set:" & vbCrLf & regPath, vbExclamation, "Disable Xbox Game Bar Capture"
Else
MsgBox "Disable Xbox Game Bar Capture" & vbCrLf & regPath & " = " & value, vbInformation
End If
End Sub