// SetDisableGameBar.cs // // Disable Xbox Game Bar Capture. // Disables background game/app capture via the Xbox Game Bar. // // Usage: dotnet new console -o SetDisableGameBar, replace Program.cs with this // file, then dotnet run. using System; using Microsoft.Win32; using RegistryKey key = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\GameDVR"); key.SetValue("AppCaptureEnabled", 0, RegistryValueKind.DWord); Console.WriteLine("Disable Xbox Game Bar Capture applied.");