From 69c95a4bec154cae42276405652215acdbc7a7bc Mon Sep 17 00:00:00 2001 From: Dipayan Biswas <108147735+d1payan@users.noreply.github.com> Date: Mon, 3 Oct 2022 02:36:35 +0530 Subject: [PATCH] Disable Gamebar Presence Writer (#202) * Fixed GameDVR Code Registry values were not changing after applying GameDVR tweaks. Because all the registry tweaks were under if condition in the code. Modified that and now working properly. * Diable Gamebar Presence Writer Gamebar Presence Writer causes stutter in games, while running in background. Deactivated the trigger of Gamebar Presence Writer to resolve this. --- winutil.ps1 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/winutil.ps1 b/winutil.ps1 index c173f1a1..e6ed0533 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -612,6 +612,14 @@ $WPFminimal.Add_Click({ $WPFtweaksbutton.Add_Click({ + If ( $WPFEssTweaksDVR.IsChecked -eq $true ) { + #Installing PowerRun to edit some restricted registry keys (Need this to disable Gamebar Presence Writer) + curl.exe -s "https://www.sordum.org/files/download/power-run/PowerRun.zip" -o ".\PowerRun.zip" + Expand-Archive -Path ".\PowerRun.zip" -DestinationPath ".\" -Force + Copy-Item -Path ".\PowerRun\PowerRun.exe" -Destination "$env:windir" -Force + Remove-Item -Path ".\PowerRun\", ".\PowerRun.zip" -Recurse + } + If ( $WPFEssTweaksAH.IsChecked -eq $true ) { Write-Host "Disabling Activity History..." Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "EnableActivityFeed" -Type DWord -Value 0 @@ -644,6 +652,10 @@ $WPFtweaksbutton.Add_Click({ Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_Enabled" -Type DWord -Value 0 Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_FSEBehavior" -Type DWord -Value 2 Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR" -Name "AllowGameDVR" -Type DWord -Value 0 + + #Disabling Gamebar Presence Writer, which causes stutter in games + PowerRun.exe /SW:0 Powershell.exe -command {Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsRuntime\ActivatableClassId\Windows.Gaming.GameBar.PresenceServer.Internal.PresenceWriter" -Name "ActivationType" -Type DWord -Value 0} + $WPFEssTweaksDVR.IsChecked = $false } If ( $WPFEssTweaksHiber.IsChecked -eq $true ) { @@ -1295,6 +1307,9 @@ $WPFundoall.Add_Click({ Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "AllowClipboardHistory" -ErrorAction SilentlyContinue Write-Host "Done - Reverted to Stock Settings" + #Enable Gamebar Presence Writer + PowerRun.exe /SW:0 Powershell.exe -command {Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsRuntime\ActivatableClassId\Windows.Gaming.GameBar.PresenceServer.Internal.PresenceWriter" -Name "ActivationType" -Type DWord -Value 1} + Write-Host "Essential Undo Completed" $ButtonType = [System.Windows.MessageBoxButton]::OK