From 1aa7574e232c34ca6724161ca15aab55d2bb1576 Mon Sep 17 00:00:00 2001 From: Carterpersall Date: Sat, 23 Apr 2022 11:03:37 -0500 Subject: [PATCH] Fix Windows 11 Bug If action center is 'disabled' in Windows 11, Quick Settings is broken. (#237) --- win10debloat.ps1 | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/win10debloat.ps1 b/win10debloat.ps1 index 741c1fc3..2a9394ac 100644 --- a/win10debloat.ps1 +++ b/win10debloat.ps1 @@ -1594,14 +1594,19 @@ $securitywindowsupdate.Add_Click({ }) $actioncenter.Add_Click({ - Write-Host "Disabling Action Center..." - If (!(Test-Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer")) { - New-Item -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer" | Out-Null + if((Get-ComputerInfo).OSName.Substring(0,20) -eq "Microsoft Windows 11"){ + Write-Host "This breaks Quick Settings in Windows 11 and is therefore not executed." + $ResultText.text = "`r`n" +"`r`n" + "This breaks Quick Settings in Windows 11 and is therefore not executed." + }else{ + Write-Host "Disabling Action Center..." + If (!(Test-Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer")) { + New-Item -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer" | Out-Null + } + Set-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "DisableNotificationCenter" -Type DWord -Value 1 + Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications" -Name "ToastEnabled" -Type DWord -Value 0 + Write-Host "Disabled Action Center" + $ResultText.text = "`r`n" +"`r`n" + "Disabled Action Center" } - Set-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "DisableNotificationCenter" -Type DWord -Value 1 - Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications" -Name "ToastEnabled" -Type DWord -Value 0 - Write-Host "Disabled Action Center" - $ResultText.text = "`r`n" +"`r`n" + "Disabled Action Center" }) $performancefx.Add_Click({