From dab00bc9947a04c1046f7f02581d7b493b487011 Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Wed, 7 Sep 2022 17:33:46 -0500 Subject: [PATCH 1/8] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 87335e2a..d1dae784 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ Launch Command: iwr -useb https://christitus.com/win | iex ``` +EXE Wrapper for $5 @ https://www.cttstore.com/windows-toolbox + ## Overview - Install From edbfcd8f097e459498e3247f94ae76cb0d7bfb2b Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Fri, 9 Sep 2022 08:28:03 -0500 Subject: [PATCH 2/8] QOL Terminal - Win Update Revamp --- winutil.ps1 | 188 +++++++++++++++------------------------------------- 1 file changed, 54 insertions(+), 134 deletions(-) diff --git a/winutil.ps1 b/winutil.ps1 index f52daef3..47ddc881 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -497,6 +497,10 @@ $WPFinstall.Add_Click({ [System.Windows.MessageBox]::Show($Messageboxbody, $AppTitle, $ButtonType, $MessageIcon) + Write-Host "=================================" + Write-Host "--- Installs are Finished ---" + Write-Host "=================================" + }) $WPFInstallUpgrade.Add_Click({ @@ -1222,6 +1226,10 @@ $WPFundoall.Add_Click({ $MessageIcon = [System.Windows.MessageBoxImage]::Information [System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon) + + Write-Host "=================================" + Write-Host "--- Undo All is Finished ---" + Write-Host "=================================" }) #=========================================================================== # Tab 3 - Config Buttons @@ -1272,6 +1280,10 @@ $WPFFeatureInstall.Add_Click({ $MessageIcon = [System.Windows.MessageBoxImage]::Information [System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon) + + Write-Host "=================================" + Write-Host "--- Features are Installed ---" + Write-Host "=================================" }) $WPFPanelDISM.Add_Click({ @@ -1305,67 +1317,16 @@ $WPFPaneluser.Add_Click({ #=========================================================================== $WPFUpdatesdefault.Add_Click({ - # Source: https://github.com/rgl/windows-vagrant/blob/master/disable-windows-updates.ps1 reversed! - Set-StrictMode -Version Latest - $ProgressPreference = 'SilentlyContinue' - $ErrorActionPreference = 'Stop' - - # disable automatic updates. - # XXX this does not seem to work anymore. - # see How to configure automatic updates by using Group Policy or registry settings - # at https://support.microsoft.com/en-us/help/328010 - function New-Directory($path) { - $p, $components = $path -split '[\\/]' - $components | ForEach-Object { - $p = "$p\$_" - If (!(Test-Path $p)) { - New-Item -ItemType Directory $p | Out-Null - } - } - $null + If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU")) { + New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Force | Out-Null } - $auPath = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU' - New-Directory $auPath - # set NoAutoUpdate. - # 0: Automatic Updates is enabled (default). - # 1: Automatic Updates is disabled. - New-ItemProperty ` - -Path $auPath ` - -Name NoAutoUpdate ` - -Value 0 ` - -PropertyType DWORD ` - -Force ` - | Out-Null - # set AUOptions. - # 1: Keep my computer up to date has been disabled in Automatic Updates. - # 2: Notify of download and installation. - # 3: Automatically download and notify of installation. - # 4: Automatically download and scheduled installation. - New-ItemProperty ` - -Path $auPath ` - -Name AUOptions ` - -Value 3 ` - -PropertyType DWORD ` - -Force ` - | Out-Null - - # disable Windows Update Delivery Optimization. - # NB this applies to Windows 10. - # 0: Disabled - # 1: PCs on my local network - # 3: PCs on my local network, and PCs on the Internet - $deliveryOptimizationPath = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config' - If (Test-Path $deliveryOptimizationPath) { - New-ItemProperty ` - -Path $deliveryOptimizationPath ` - -Name DODownloadMode ` - -Value 0 ` - -PropertyType DWORD ` - -Force ` - | Out-Null + Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoUpdate" -Type DWord -Value 0 + Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUOptions" -Type DWord -Value 3 + If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config")) { + New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Force | Out-Null } - # Service tweaks for Windows Update - + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Name "DODownloadMode" -Type DWord -Value 1 + $services = @( "BITS" "wuauserv" @@ -1390,6 +1351,9 @@ $WPFUpdatesdefault.Add_Click({ Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "BranchReadinessLevel" -ErrorAction SilentlyContinue Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferFeatureUpdatesPeriodInDays" -ErrorAction SilentlyContinue Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferQualityUpdatesPeriodInDays " -ErrorAction SilentlyContinue + Write-Host "=================================" + Write-Host "--- Updates Set to Default ---" + Write-Host "=================================" }) $WPFFixesUpdate.Add_Click({ @@ -1399,8 +1363,6 @@ $WPFFixesUpdate.Add_Click({ Stop-Service -Name wuauserv Stop-Service -Name appidsvc Stop-Service -Name cryptsvc - - Write-Host "2. Remove QMGR Data file..." Remove-Item "$env:allusersprofile\Application Data\Microsoft\Network\Downloader\qmgr*.dat" -ErrorAction SilentlyContinue @@ -1415,7 +1377,6 @@ $WPFFixesUpdate.Add_Click({ Write-Host "5. Resetting the Windows Update Services to defualt settings..." "sc.exe sdset bits D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)" "sc.exe sdset wuauserv D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)" - Set-Location $env:systemroot\system32 Write-Host "6. Registering some DLLs..." @@ -1464,6 +1425,7 @@ $WPFFixesUpdate.Add_Click({ Write-Host "8) Resetting the WinSock..." netsh winsock reset netsh winhttp reset proxy + netsh int ip reset Write-Host "9) Delete all BITS jobs..." Get-BitsTransfer | Remove-BitsTransfer @@ -1493,82 +1455,37 @@ $WPFFixesUpdate.Add_Click({ $MessageIcon = [System.Windows.MessageBoxImage]::Information [System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon) + Write-Host "=================================" + Write-Host "-- Reset ALL Updates to Factory -" + Write-Host "=================================" }) + $WPFUpdatesdisable.Add_Click({ - # Source: https://github.com/rgl/windows-vagrant/blob/master/disable-windows-updates.ps1 - Set-StrictMode -Version Latest - $ProgressPreference = 'SilentlyContinue' - $ErrorActionPreference = 'Stop' + If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU")) { + New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Force | Out-Null + } + Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoUpdate" -Type DWord -Value 1 + Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUOptions" -Type DWord -Value 1 + If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config")) { + New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Force | Out-Null + } + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Name "DODownloadMode" -Type DWord -Value 0 + + $services = @( + "BITS" + "wuauserv" + ) - # disable automatic updates. - # XXX this does not seem to work anymore. - # see How to configure automatic updates by using Group Policy or registry settings - # at https://support.microsoft.com/en-us/help/328010 - function New-Directory($path) { - $p, $components = $path -split '[\\/]' - $components | ForEach-Object { - $p = "$p\$_" - If (!(Test-Path $p)) { - New-Item -ItemType Directory $p | Out-Null - } - } - $null - } - $auPath = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU' - New-Directory $auPath - # set NoAutoUpdate. - # 0: Automatic Updates is enabled (default). - # 1: Automatic Updates is disabled. - New-ItemProperty ` - -Path $auPath ` - -Name NoAutoUpdate ` - -Value 1 ` - -PropertyType DWORD ` - -Force ` - | Out-Null - # set AUOptions. - # 1: Keep my computer up to date has been disabled in Automatic Updates. - # 2: Notify of download and installation. - # 3: Automatically download and notify of installation. - # 4: Automatically download and scheduled installation. - New-ItemProperty ` - -Path $auPath ` - -Name AUOptions ` - -Value 1 ` - -PropertyType DWORD ` - -Force ` - | Out-Null + foreach ($service in $services) { + # -ErrorAction SilentlyContinue is so it doesn't write an error to stdout if a service doesn't exist - # disable Windows Update Delivery Optimization. - # NB this applies to Windows 10. - # 0: Disabled - # 1: PCs on my local network - # 3: PCs on my local network, and PCs on the Internet - $deliveryOptimizationPath = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config' - If (Test-Path $deliveryOptimizationPath) { - New-ItemProperty ` - -Path $deliveryOptimizationPath ` - -Name DODownloadMode ` - -Value 0 ` - -PropertyType DWORD ` - -Force ` - | Out-Null - } - # Service tweaks for Windows Update - - $services = @( - "BITS" - "wuauserv" - ) - - foreach ($service in $services) { - # -ErrorAction SilentlyContinue is so it doesn't write an error to stdout if a service doesn't exist - - Write-Host "Setting $service StartupType to Disabled" - Get-Service -Name $service -ErrorAction SilentlyContinue | Set-Service -StartupType Disabled - } - - }) + Write-Host "Setting $service StartupType to Disabled" + Get-Service -Name $service -ErrorAction SilentlyContinue | Set-Service -StartupType Disabled + } + Write-Host "=================================" + Write-Host "--- Updates ARE DISABLED ---" + Write-Host "=================================" +}) $WPFUpdatessecurity.Add_Click({ Write-Host "Disabling driver offering through Windows Update..." If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Device Metadata")) { @@ -1602,6 +1519,9 @@ $WPFUpdatessecurity.Add_Click({ $MessageIcon = [System.Windows.MessageBoxImage]::Information [System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon) + Write-Host "=================================" + Write-Host "-- Updates Set to Recommended ---" + Write-Host "=================================" }) #=========================================================================== From b3daa2f32ca4da7f2c46691970ccc3ce328c1455 Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Mon, 12 Sep 2022 20:01:14 -0500 Subject: [PATCH 3/8] Fix Flickering --- winutil.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/winutil.ps1 b/winutil.ps1 index 47ddc881..20a65372 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -851,7 +851,8 @@ $WPFtweaksbutton.Add_Click({ Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control" -Name "WaitToKillServiceTimeout" -Type DWord -Value 2000 Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "MenuShowDelay" -Type DWord -Value 1 Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "WaitToKillAppTimeout" -Type DWord -Value 5000 - Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "HungAppTimeout" -Type DWord -Value 4000 + Remove-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "HungAppTimeout" -ErrorAction SilentlyContinue + # Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "HungAppTimeout" -Type DWord -Value 4000 # Note: This caused flickering Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "AutoEndTasks" -Type DWord -Value 1 Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "LowLevelHooksTimeout" -Type DWord -Value 1000 Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "WaitToKillServiceTimeout" -Type DWord -Value 2000 @@ -1212,7 +1213,7 @@ $WPFundoall.Add_Click({ Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarAnimations" -Type DWord -Value 1 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects" -Name "VisualFXSetting" -Type DWord -Value 3 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "EnableAeroPeek" -Type DWord -Value 1 - + Remove-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "HungAppTimeout" -ErrorAction SilentlyContinue Write-Host "Restoring Clipboard History..." Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Clipboard" -Name "EnableClipboardHistory" -ErrorAction SilentlyContinue Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "AllowClipboardHistory" -ErrorAction SilentlyContinue From e770c2d5daa516ab17d3a1b9d7c9ad3ca43dc19d Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Wed, 21 Sep 2022 08:55:35 -0500 Subject: [PATCH 4/8] Quick Fix - UAC Property error --- winutil.ps1 | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/winutil.ps1 b/winutil.ps1 index 1684a58f..d9800848 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -551,7 +551,6 @@ $WPFdesktop.Add_Click({ $WPFMiscTweaksNum.IsChecked = $true $WPFMiscTweaksLapPower.IsChecked = $false $WPFMiscTweaksLapNum.IsChecked = $false - $WPFMiscTweaksDisableUAC.IsChecked = $true }) $WPFlaptop.Add_Click({ @@ -572,7 +571,6 @@ $WPFlaptop.Add_Click({ $WPFMiscTweaksLapNum.IsChecked = $true $WPFMiscTweaksPower.IsChecked = $false $WPFMiscTweaksNum.IsChecked = $false - $WPFMiscTweaksDisableUAC.IsChecked = $true }) $WPFminimal.Add_Click({ @@ -593,7 +591,6 @@ $WPFminimal.Add_Click({ $WPFMiscTweaksNum.IsChecked = $false $WPFMiscTweaksLapPower.IsChecked = $false $WPFMiscTweaksLapNum.IsChecked = $false - $WPFMiscTweaksDisableUAC.IsChecked = $true }) $WPFtweaksbutton.Add_Click({ @@ -647,17 +644,6 @@ $WPFtweaksbutton.Add_Click({ ./OOSU10.exe ooshutup10.cfg /quiet $WPFEssTweaksOO.IsChecked = $false } - If ( $WPFMiscTweaksDisableUAC.IsChecked -eq $true) { - Write-Host "Disabling UAC..." - # This below is the pussy mode which can break some apps. Please. Leave this on 1. - # below i will show a way to do it without breaking some Apps that check UAC. U need to be admin tho. - # Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "EnableLUA" -Type DWord -Value 0 - Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -Name ConsentPromptBehaviorAdmin -Type DWord -Value 0 # Default is 5 - # This will set the GPO Entry in Security so that Admin users elevate without any prompt while normal users still elevate and u can even leave it ennabled. - # It will just not bother u anymore - - $WPFMiscTweaksDisableUAC.IsChecked = $false - } If ( $WPFEssTweaksRP.IsChecked -eq $true ) { Write-Host "Creating Restore Point in case something bad happens" Enable-ComputerRestore -Drive "$env:SystemDrive" From 7870ab2ad558b72a625a65bb2880a88ea9dd908d Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Sun, 25 Sep 2022 13:24:19 -0500 Subject: [PATCH 5/8] Network Performance Tweak --- winutil.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winutil.ps1 b/winutil.ps1 index d9800848..73593f9e 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -854,8 +854,8 @@ $WPFtweaksbutton.Add_Click({ ## Performance Tweaks and More Telemetry Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching" -Name "SearchOrderConfig" -Type DWord -Value 0 - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" -Name "SystemResponsiveness" -Type DWord -Value 10 - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" -Name "NetworkThrottlingIndex" -Type DWord -Value 10 + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" -Name "SystemResponsiveness" -Type DWord -Value 0 + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" -Name "NetworkThrottlingIndex" -Type DWord -Value 4294967295 Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control" -Name "WaitToKillServiceTimeout" -Type DWord -Value 2000 Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "MenuShowDelay" -Type DWord -Value 1 Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "WaitToKillAppTimeout" -Type DWord -Value 5000 From ff694a5d6b7d54423eebfc98b09a2f5d2b7832ed Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Sun, 25 Sep 2022 13:33:44 -0500 Subject: [PATCH 6/8] Gaming Tweaks --- winutil.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/winutil.ps1 b/winutil.ps1 index 73593f9e..d786174e 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -855,7 +855,6 @@ $WPFtweaksbutton.Add_Click({ ## Performance Tweaks and More Telemetry Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching" -Name "SearchOrderConfig" -Type DWord -Value 0 Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" -Name "SystemResponsiveness" -Type DWord -Value 0 - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" -Name "NetworkThrottlingIndex" -Type DWord -Value 4294967295 Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control" -Name "WaitToKillServiceTimeout" -Type DWord -Value 2000 Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "MenuShowDelay" -Type DWord -Value 1 Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "WaitToKillAppTimeout" -Type DWord -Value 5000 @@ -870,7 +869,13 @@ $WPFtweaksbutton.Add_Click({ # Network Tweaks Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" -Name "IRPStackSize" -Type DWord -Value 20 + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" -Name "NetworkThrottlingIndex" -Type DWord -Value 4294967295 + # Gaming Tweaks + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" -Name "GPU Priority" -Type DWord -Value 8 + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" -Name "Priority" -Type DWord -Value 6 + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks\Games" -Name "Scheduling Category" -Type String -Value "High" + # Group svchost.exe processes $ram = (Get-CimInstance -ClassName Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum).Sum / 1kb Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control" -Name "SvcHostSplitThresholdInKB" -Type DWord -Value $ram -Force From f272200c101707dfc5de0893edd6ccaddf9c77e8 Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Sun, 25 Sep 2022 13:44:14 -0500 Subject: [PATCH 7/8] Delete Temp Files Addition --- winutil.ps1 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/winutil.ps1 b/winutil.ps1 index d786174e..842b4451 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -536,6 +536,7 @@ $WPFInstallUpgrade.Add_Click({ $WPFdesktop.Add_Click({ $WPFEssTweaksAH.IsChecked = $true + $WPFEssTweaksDeleteTempFiles.IsChecked = $true $WPFEssTweaksDeBloat.IsChecked = $false $WPFEssTweaksDVR.IsChecked = $true $WPFEssTweaksHiber.IsChecked = $true @@ -556,6 +557,7 @@ $WPFdesktop.Add_Click({ $WPFlaptop.Add_Click({ $WPFEssTweaksAH.IsChecked = $true + $WPFEssTweaksDeleteTempFiles.IsChecked = $true $WPFEssTweaksDeBloat.IsChecked = $false $WPFEssTweaksDVR.IsChecked = $true $WPFEssTweaksHiber.IsChecked = $false @@ -576,6 +578,7 @@ $WPFlaptop.Add_Click({ $WPFminimal.Add_Click({ $WPFEssTweaksAH.IsChecked = $false + $WPFEssTweaksDeleteTempFiles.IsChecked = $false $WPFEssTweaksDeBloat.IsChecked = $false $WPFEssTweaksDVR.IsChecked = $false $WPFEssTweaksHiber.IsChecked = $false @@ -603,6 +606,13 @@ $WPFtweaksbutton.Add_Click({ $WPFEssTweaksAH.IsChecked = $false } + If ( $WPFEssTweaksDeleteTempFiles.IsChecked -eq $true ) { + Write-Host "Delete Temp Files" + Get-ChildItem -Path "C:\Windows\Temp" *.* -Recurse | Remove-Item -Force -Recurse + Get-ChildItem -Path $env:TEMP *.* -Recurse | Remove-Item -Force -Recurse + $WPFEssTweaksDeleteTempFiles.IsChecked = $false + } + If ( $WPFEssTweaksDVR.IsChecked -eq $true ) { If (!(Test-Path "HKCU:\System\GameConfigStore")) { Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_DXGIHonorFSEWindowsCompatible" -Type Hex -Value 00000000 From 7500e3010694c63b34e0a5c80e284dc4c05ca830 Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Sun, 25 Sep 2022 13:45:55 -0500 Subject: [PATCH 8/8] Delete Temp Files GUI --- MainWindow.xaml | 1 + 1 file changed, 1 insertion(+) diff --git a/MainWindow.xaml b/MainWindow.xaml index 067408a4..3d4ed8dc 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -157,6 +157,7 @@ +