mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-22 14:01:31 -06:00
Added option to Disable Notifications and Action Center (#220)
This commit is contained in:
parent
3007793541
commit
122918e3dc
@ -187,6 +187,7 @@
|
|||||||
<CheckBox Name="MiscTweaksDisplay" Content="Set Display for Performance" Margin="5,0"/>
|
<CheckBox Name="MiscTweaksDisplay" Content="Set Display for Performance" Margin="5,0"/>
|
||||||
<CheckBox Name="MiscTweaksUTC" Content="Set Time to UTC (Dual Boot)" Margin="5,0"/>
|
<CheckBox Name="MiscTweaksUTC" Content="Set Time to UTC (Dual Boot)" Margin="5,0"/>
|
||||||
<CheckBox Name="MiscTweaksDisableUAC" Content="Disable UAC" Margin="5,0"/>
|
<CheckBox Name="MiscTweaksDisableUAC" Content="Disable UAC" Margin="5,0"/>
|
||||||
|
<CheckBox Name="WPFMiscTweaksDisableNotifications" Content="Disable Notification" Margin="5,0"/>
|
||||||
<CheckBox Name="MiscTweaksDisableTPMCheck" Content="Disable TPM on Update" Margin="5,0"/>
|
<CheckBox Name="MiscTweaksDisableTPMCheck" Content="Disable TPM on Update" Margin="5,0"/>
|
||||||
<CheckBox Name="EssTweaksDeBloat" Content="Remove ALL MS Store Apps" Margin="5,0"/>
|
<CheckBox Name="EssTweaksDeBloat" Content="Remove ALL MS Store Apps" Margin="5,0"/>
|
||||||
|
|
||||||
|
21
winutil.ps1
21
winutil.ps1
@ -5,8 +5,8 @@
|
|||||||
Version 0.0.1
|
Version 0.0.1
|
||||||
#>
|
#>
|
||||||
|
|
||||||
# $inputXML = Get-Content "MainWindow.xaml" #uncomment for development
|
$inputXML = Get-Content "MainWindow.xaml" #uncomment for development
|
||||||
$inputXML = (new-object Net.WebClient).DownloadString("https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/MainWindow.xaml") #uncomment for Production
|
# $inputXML = (new-object Net.WebClient).DownloadString("https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/MainWindow.xaml") #uncomment for Production
|
||||||
|
|
||||||
$inputXML = $inputXML -replace 'mc:Ignorable="d"', '' -replace "x:N", 'N' -replace '^<Win.*', '<Window'
|
$inputXML = $inputXML -replace 'mc:Ignorable="d"', '' -replace "x:N", 'N' -replace '^<Win.*', '<Window'
|
||||||
[void][System.Reflection.Assembly]::LoadWithPartialName('presentationframework')
|
[void][System.Reflection.Assembly]::LoadWithPartialName('presentationframework')
|
||||||
@ -586,6 +586,7 @@ $WPFdesktop.Add_Click({
|
|||||||
$WPFEssTweaksTele.IsChecked = $true
|
$WPFEssTweaksTele.IsChecked = $true
|
||||||
$WPFEssTweaksWifi.IsChecked = $true
|
$WPFEssTweaksWifi.IsChecked = $true
|
||||||
$WPFMiscTweaksDisableUAC.IsChecked = $false
|
$WPFMiscTweaksDisableUAC.IsChecked = $false
|
||||||
|
$WPFWPFMiscTweaksDisableNotifications.IsChecked = $false
|
||||||
$WPFMiscTweaksPower.IsChecked = $true
|
$WPFMiscTweaksPower.IsChecked = $true
|
||||||
$WPFMiscTweaksNum.IsChecked = $true
|
$WPFMiscTweaksNum.IsChecked = $true
|
||||||
$WPFMiscTweaksLapPower.IsChecked = $false
|
$WPFMiscTweaksLapPower.IsChecked = $false
|
||||||
@ -609,6 +610,7 @@ $WPFlaptop.Add_Click({
|
|||||||
$WPFEssTweaksTele.IsChecked = $true
|
$WPFEssTweaksTele.IsChecked = $true
|
||||||
$WPFEssTweaksWifi.IsChecked = $true
|
$WPFEssTweaksWifi.IsChecked = $true
|
||||||
$WPFMiscTweaksDisableUAC.IsChecked = $false
|
$WPFMiscTweaksDisableUAC.IsChecked = $false
|
||||||
|
$WPFWPFMiscTweaksDisableNotifications.IsChecked = $false
|
||||||
$WPFMiscTweaksLapPower.IsChecked = $true
|
$WPFMiscTweaksLapPower.IsChecked = $true
|
||||||
$WPFMiscTweaksLapNum.IsChecked = $true
|
$WPFMiscTweaksLapNum.IsChecked = $true
|
||||||
$WPFMiscTweaksPower.IsChecked = $false
|
$WPFMiscTweaksPower.IsChecked = $false
|
||||||
@ -632,6 +634,7 @@ $WPFminimal.Add_Click({
|
|||||||
$WPFEssTweaksTele.IsChecked = $true
|
$WPFEssTweaksTele.IsChecked = $true
|
||||||
$WPFEssTweaksWifi.IsChecked = $false
|
$WPFEssTweaksWifi.IsChecked = $false
|
||||||
$WPFMiscTweaksDisableUAC.IsChecked = $false
|
$WPFMiscTweaksDisableUAC.IsChecked = $false
|
||||||
|
$WPFWPFMiscTweaksDisableNotifications.IsChecked = $false
|
||||||
$WPFMiscTweaksPower.IsChecked = $false
|
$WPFMiscTweaksPower.IsChecked = $false
|
||||||
$WPFMiscTweaksNum.IsChecked = $false
|
$WPFMiscTweaksNum.IsChecked = $false
|
||||||
$WPFMiscTweaksLapPower.IsChecked = $false
|
$WPFMiscTweaksLapPower.IsChecked = $false
|
||||||
@ -736,6 +739,17 @@ $WPFtweaksbutton.Add_Click({
|
|||||||
|
|
||||||
$WPFMiscTweaksDisableUAC.IsChecked = $false
|
$WPFMiscTweaksDisableUAC.IsChecked = $false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
If ( $WPFWPFMiscTweaksDisableNotifications.IsChecked -eq $true) {
|
||||||
|
Write-Host "Disabling Notifications and Action Center..."
|
||||||
|
|
||||||
|
New-Item -Path "HKCU:\Software\Policies\Microsoft\Windows" -Name "Explorer" -force
|
||||||
|
New-ItemProperty -Path "HKCU:\Software\Policies\Microsoft\Windows\Explorer" -Name "DisableNotificationCenter" -PropertyType "DWord" -Value 1
|
||||||
|
New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\PushNotifications" -Name "ToastEnabled" -PropertyType "DWord" -Value 0 -force
|
||||||
|
|
||||||
|
$WPFWPFMiscTweaksDisableNotifications.IsChecked = $false
|
||||||
|
}
|
||||||
|
|
||||||
If ( $WPFEssTweaksOO.IsChecked -eq $true ) {
|
If ( $WPFEssTweaksOO.IsChecked -eq $true ) {
|
||||||
Write-Host "Running O&O Shutup with Recommended Settings"
|
Write-Host "Running O&O Shutup with Recommended Settings"
|
||||||
curl.exe -ss "https://raw.githubusercontent.com/ChrisTitusTech/win10script/master/ooshutup10.cfg" -o ooshutup10.cfg
|
curl.exe -ss "https://raw.githubusercontent.com/ChrisTitusTech/win10script/master/ooshutup10.cfg" -o ooshutup10.cfg
|
||||||
@ -1333,6 +1347,9 @@ $WPFundoall.Add_Click({
|
|||||||
Write-Host "Restoring Clipboard History..."
|
Write-Host "Restoring Clipboard History..."
|
||||||
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Clipboard" -Name "EnableClipboardHistory" -ErrorAction SilentlyContinue
|
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Clipboard" -Name "EnableClipboardHistory" -ErrorAction SilentlyContinue
|
||||||
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "AllowClipboardHistory" -ErrorAction SilentlyContinue
|
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "AllowClipboardHistory" -ErrorAction SilentlyContinue
|
||||||
|
Write-Host "Enabling Notifications and Action Center"
|
||||||
|
Remove-Item -Path HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Force
|
||||||
|
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\PushNotifications" -Name "ToastEnabled"
|
||||||
Write-Host "Done - Reverted to Stock Settings"
|
Write-Host "Done - Reverted to Stock Settings"
|
||||||
|
|
||||||
#Enable Gamebar Presence Writer
|
#Enable Gamebar Presence Writer
|
||||||
|
Loading…
Reference in New Issue
Block a user