mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-14 14:45:52 -06:00
Delete Temp Files Addition
This commit is contained in:
parent
ff694a5d6b
commit
f272200c10
10
winutil.ps1
10
winutil.ps1
@ -536,6 +536,7 @@ $WPFInstallUpgrade.Add_Click({
|
|||||||
$WPFdesktop.Add_Click({
|
$WPFdesktop.Add_Click({
|
||||||
|
|
||||||
$WPFEssTweaksAH.IsChecked = $true
|
$WPFEssTweaksAH.IsChecked = $true
|
||||||
|
$WPFEssTweaksDeleteTempFiles.IsChecked = $true
|
||||||
$WPFEssTweaksDeBloat.IsChecked = $false
|
$WPFEssTweaksDeBloat.IsChecked = $false
|
||||||
$WPFEssTweaksDVR.IsChecked = $true
|
$WPFEssTweaksDVR.IsChecked = $true
|
||||||
$WPFEssTweaksHiber.IsChecked = $true
|
$WPFEssTweaksHiber.IsChecked = $true
|
||||||
@ -556,6 +557,7 @@ $WPFdesktop.Add_Click({
|
|||||||
$WPFlaptop.Add_Click({
|
$WPFlaptop.Add_Click({
|
||||||
|
|
||||||
$WPFEssTweaksAH.IsChecked = $true
|
$WPFEssTweaksAH.IsChecked = $true
|
||||||
|
$WPFEssTweaksDeleteTempFiles.IsChecked = $true
|
||||||
$WPFEssTweaksDeBloat.IsChecked = $false
|
$WPFEssTweaksDeBloat.IsChecked = $false
|
||||||
$WPFEssTweaksDVR.IsChecked = $true
|
$WPFEssTweaksDVR.IsChecked = $true
|
||||||
$WPFEssTweaksHiber.IsChecked = $false
|
$WPFEssTweaksHiber.IsChecked = $false
|
||||||
@ -576,6 +578,7 @@ $WPFlaptop.Add_Click({
|
|||||||
$WPFminimal.Add_Click({
|
$WPFminimal.Add_Click({
|
||||||
|
|
||||||
$WPFEssTweaksAH.IsChecked = $false
|
$WPFEssTweaksAH.IsChecked = $false
|
||||||
|
$WPFEssTweaksDeleteTempFiles.IsChecked = $false
|
||||||
$WPFEssTweaksDeBloat.IsChecked = $false
|
$WPFEssTweaksDeBloat.IsChecked = $false
|
||||||
$WPFEssTweaksDVR.IsChecked = $false
|
$WPFEssTweaksDVR.IsChecked = $false
|
||||||
$WPFEssTweaksHiber.IsChecked = $false
|
$WPFEssTweaksHiber.IsChecked = $false
|
||||||
@ -603,6 +606,13 @@ $WPFtweaksbutton.Add_Click({
|
|||||||
$WPFEssTweaksAH.IsChecked = $false
|
$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 ( $WPFEssTweaksDVR.IsChecked -eq $true ) {
|
||||||
If (!(Test-Path "HKCU:\System\GameConfigStore")) {
|
If (!(Test-Path "HKCU:\System\GameConfigStore")) {
|
||||||
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_DXGIHonorFSEWindowsCompatible" -Type Hex -Value 00000000
|
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_DXGIHonorFSEWindowsCompatible" -Type Hex -Value 00000000
|
||||||
|
Loading…
Reference in New Issue
Block a user