📄 JScript (WSH)

Disable Xbox Game Bar Capture (JScript)

Disables background game/app capture via the Xbox Game Bar. Applies the tweak via WScript.Shell.RegWrite (JScript syntax).

By WindowsScripting.com · 613 B
SetDisableGameBar.js
// ============================================================
// SetDisableGameBar.js
//
// Disable Xbox Game Bar Capture.
// Disables background game/app capture via the Xbox Game Bar.
//
// Usage: cscript SetDisableGameBar.js
// ============================================================

var objShell = WScript.CreateObject("WScript.Shell");

try {
    objShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\GameDVR\\AppCaptureEnabled", 0, "REG_DWORD");
    WScript.Echo("Disable Xbox Game Bar Capture applied.");
} catch (e) {
    WScript.Echo("Failed to apply tweak: " + e.description);
}