mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-22 05:51:30 -06:00
Disk Cleanup Addition
This commit is contained in:
parent
696a0a2afd
commit
7ac6d2cbc0
@ -160,6 +160,7 @@
|
||||
<CheckBox Name="EssTweaksWifi" Content="Disable Wifi-Sense" Margin="5,0"/>
|
||||
<CheckBox Name="EssTweaksAH" Content="Disable Activity History" Margin="5,0"/>
|
||||
<CheckBox Name="EssTweaksDeleteTempFiles" Content="Delete Temporary Files" Margin="5,0"/>
|
||||
<CheckBox Name="EssTweaksDiskCleanup" Content="Delete Temporary Files" Margin="5,0"/>
|
||||
<CheckBox Name="EssTweaksLoc" Content="Disable Location Tracking" Margin="5,0"/>
|
||||
<CheckBox Name="EssTweaksHome" Content="Disable Homegroup" Margin="5,0"/>
|
||||
<CheckBox Name="EssTweaksStorage" Content="Disable Storage Sense" Margin="5,0"/>
|
||||
|
16
winutil.ps1
16
winutil.ps1
@ -546,6 +546,7 @@ $WPFdesktop.Add_Click({
|
||||
$WPFEssTweaksAH.IsChecked = $true
|
||||
$WPFEssTweaksDeleteTempFiles.IsChecked = $true
|
||||
$WPFEssTweaksDeBloat.IsChecked = $false
|
||||
$WPFEssTweaksDiskCleanup.IsChecked = $false
|
||||
$WPFEssTweaksDVR.IsChecked = $true
|
||||
$WPFEssTweaksHiber.IsChecked = $true
|
||||
$WPFEssTweaksHome.IsChecked = $true
|
||||
@ -568,6 +569,7 @@ $WPFlaptop.Add_Click({
|
||||
$WPFEssTweaksAH.IsChecked = $true
|
||||
$WPFEssTweaksDeleteTempFiles.IsChecked = $true
|
||||
$WPFEssTweaksDeBloat.IsChecked = $false
|
||||
$WPFEssTweaksDiskCleanup.IsChecked = $false
|
||||
$WPFEssTweaksDVR.IsChecked = $true
|
||||
$WPFEssTweaksHiber.IsChecked = $false
|
||||
$WPFEssTweaksHome.IsChecked = $true
|
||||
@ -590,6 +592,7 @@ $WPFminimal.Add_Click({
|
||||
$WPFEssTweaksAH.IsChecked = $false
|
||||
$WPFEssTweaksDeleteTempFiles.IsChecked = $false
|
||||
$WPFEssTweaksDeBloat.IsChecked = $false
|
||||
$WPFEssTweaksDiskCleanup.IsChecked = $false
|
||||
$WPFEssTweaksDVR.IsChecked = $false
|
||||
$WPFEssTweaksHiber.IsChecked = $false
|
||||
$WPFEssTweaksHome.IsChecked = $true
|
||||
@ -622,6 +625,13 @@ $WPFtweaksbutton.Add_Click({
|
||||
Get-ChildItem -Path "C:\Windows\Temp" *.* -Recurse | Remove-Item -Force -Recurse
|
||||
Get-ChildItem -Path $env:TEMP *.* -Recurse | Remove-Item -Force -Recurse
|
||||
$WPFEssTweaksDeleteTempFiles.IsChecked = $false
|
||||
Write-Host "================================="
|
||||
Write-Host "--- !!!!ERRORS ARE NORMAL!!!! ---"
|
||||
Write-Host "--- Cleaned following folders:---"
|
||||
Write-Host "--- C:\Windows\Temp ---"
|
||||
Write-Host "---"$env:TEMP"---"
|
||||
Write-Host "================================="
|
||||
|
||||
}
|
||||
|
||||
If ( $WPFEssTweaksDVR.IsChecked -eq $true ) {
|
||||
@ -666,6 +676,12 @@ $WPFtweaksbutton.Add_Click({
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\Setup\MoSetup" -Name "AllowUpgradesWithUnsupportedTPM" -Type DWord -Value 1
|
||||
$WPFMiscTweaksDisableTPMCheck.IsChecked = $false
|
||||
}
|
||||
If ( $WPFEssTweaksDiskCleanup.IsChecked -eq $true ) {
|
||||
Write-Host "Running Disk Cleanup on Drive C:..."
|
||||
cmd /c cleanmgr.exe /d C: /VERYLOWDISK
|
||||
$WPFEssTweaksDiskCleanup.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.
|
||||
|
Loading…
Reference in New Issue
Block a user