Skip to content

Commit 3ed79b0

Browse files
authored
Add files via upload
1 parent 7b23bf0 commit 3ed79b0

File tree

1 file changed

+49
-37
lines changed

1 file changed

+49
-37
lines changed

WindowsCleanerUtility.bat

Lines changed: 49 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@echo off
2-
mode con cols=122 lines=40
2+
mode con cols=129 lines=40
33
chcp 65001
44
cls
55

@@ -50,12 +50,12 @@ echo  ╚╗╔╗╔╝╔╣╠╗║║ ║║║╔╝╚╝║║
5050
echo  ╚╝╚╝ ╚══╝╚╝ ╚═╝╚═══╝╚═══╝ ╚╝╚╝ ╚═══╝  ╚═══╝╚═══╝╚═══╝╚╝ ╚╝╚╝ ╚═╝╚═══╝╚╝╚═╝  ╚═══╝ ╚══╝ ╚══╝╚═══╝╚══╝ ╚══╝ ╚╝
5151
echo.
5252
echo.
53-
echo [40;33m ╔════════════════════════════════╗
54-
echo [40;33m ║ Windows Cleaner Utility ║
55-
echo [40;33m ║ coded by Chainski Tools
56-
echo [40;33m ╚════════════════════════════════╝
53+
echo [40;33m ╔════════════════════════════════╗
54+
echo [40;33m ║ Windows Cleaner Utility ║
55+
echo [40;33m ║ coded by Chainski
56+
echo [40;33m ╚════════════════════════════════╝
5757

58-
title Windows Cleaner Utility %ver% by Chainski Tools
58+
title Windows Cleaner Utility %ver% by Chainski
5959
echo.
6060
echo  Press a button from 1 to 5 - each of these buttons has its own function as described below:
6161
echo.
@@ -89,7 +89,7 @@ DISM /Online /Cleanup-Image /RestoreHealth
8989
cls
9090
echo Windows Repaired Successfully!
9191
echo --------------------------------------------------
92-
echo Press ENTER KEY yo Continue.
92+
echo Press ENTER KEY to Continue.
9393
echo --------------------------------------------------
9494
pause >nul
9595
goto menu
@@ -115,65 +115,75 @@ if %errorlevel%==2 exit
115115
:clear
116116
rem Delete Temporary Files
117117

118-
RMDIR "%tmp%" /S /Q >nul 2>nul
119-
del /s /f /q %temp%\*.* >nul 2>nul
120-
cleanmgr.exe /autoclean :: Used to delete old files left after upgrading a Windows build
121-
del /s /f /q %windir%\temp\*.* >nul 2>nul
122-
cls
123-
124118
echo [Cleaning] and Optimizations in progress...
125119
timeout /t 2 /nobreak >nul
126120
echo.
127121

128122
echo [Cleaning] Temporary Files && color c
129123
timeout /t 2 /nobreak >nul
124+
cleanmgr /autoclean
125+
dism /online /cleanup-image /analyzecomponentstore
126+
dism /online /cleanup-image /startcomponentcleanup
127+
del /s /q /f %systemdrive%\$Recycle.bin\* >nul 2>nul
128+
del /f /q /s "%appdata%\Microsoft\Windows\PowerShell\PSReadLine\*.*" >nul 2>nul
129+
130+
taskkill /f /im explorer.exe
131+
echo You will need to restart the PC to finish rebuilding your icon cache.
132+
DEL /F /S /Q /A %LocalAppData%\Microsoft\Windows\Explorer\thumbcache_*.db >nul 2>nul
133+
DEL /f /s /q /a %LocalAppData%\Microsoft\Windows\Explorer\*.db >nul 2>nul
134+
start explorer.exe
130135
echo.
131136

132-
:: Empties the RecycleBin
133-
del /s /q /f %systemdrive%\$Recycle.bin\* >nul 2>nul
137+
net stop wuauserv
138+
del /s /q "C:\Windows\SoftwareDistribution\Download\*" >nul 2>nul
139+
net start wuauserv
140+
echo.
134141

142+
del /s /f /q "%temp%\*.*" >nul 2>nul
143+
del /f /s /q %systemroot%\memory.dmp >nul 2>nul
144+
del /f /s /q %systemroot%\Minidump\*.* >nul 2>nul
135145
del /s /f /q %windir%\temp\*.* >nul 2>nul
146+
del /s /f /q %LOCALAPPDATA%\CrashDumps\*.* >nul 2>nul
136147
del /s /f /q %windir%\Prefetch\*.* >nul 2>nul
137148
del /s /f /q %LOCALAPPDATA%\Microsoft\Windows\Caches\*.* >nul 2>nul
138-
del /s /f /q %windir%\SoftwareDistribution\Download\*.* >nul 2>nul
139149
del /s /f /q %programdata%\Microsoft\Windows\WER\Temp\*.* >nul 2>nul
140150
del /s /f /q %HomePath%\AppData\LocalLow\Temp\*.* >nul 2>nul
141151
del /f /s /q %systemdrive%\*.tmp 2>nul >nul
142-
rd /s /f /q %windir%\history 2>nul >nul
143-
rd /s /f /q %windir%\cookies 2>nul >nul
152+
del /f /s /q "%userprofile%\cookies\*.*" >nul 2>nul
144153

145154

146155
echo [Cleaning] Log Files && color b
147156
timeout /t 2 /nobreak >nul
148157
echo.
149158

150159
REM Delete Log Files
151-
del /f /s /q %systemdrive%\*.log >nul 2>nul
152-
del /f /s /q %systemdrive%\*.old >nul 2>nul
153-
del /f /s /q %systemdrive%\*.trace >nul 2>nul
154-
del /f /s /q %windir%\*.bak >nul 2>nul
155-
del /s /f /q %windir%\Logs\CBS\CbsPersist*.log >nul 2>nul
156-
del /s /f /q %windir%\Logs\MoSetup\*.log >nul 2>nul
157-
del /s /f /q %windir%\Panther\*.log >nul 2>nul
158-
del /s /f /q %windir%\logs\*.log >nul 2>nul
159-
del /s /f /q %localappdata%\Microsoft\Windows\WebCache\*.log >nul 2>nul
160-
rd /s /f /q %localappdata%\Microsoft\Windows\INetCache\*.log >nul 2>nul
161-
162-
163-
:: Remove Event Logs.
164-
wevtutil.exe cl Application
165-
wevtutil.exe cl System
160+
del /f /s /q "%systemdrive%\*.log" >nul 2>nul
161+
del /f /s /q "%systemdrive%\*.old" >nul 2>nul
162+
del /f /s /q "%systemdrive%\*.trace" >nul 2>nul
163+
del /f /s /q "%windir%\*.bak" >nul 2>nul
164+
del /s /f /q "%windir%\Logs\CBS\CbsPersist\*.log" >nul 2>nul
165+
del /s /f /q "%windir%\Logs\MoSetup\*.log" >nul 2>nul
166+
del /s /f /q "%windir%\Panther\*.log" >nul 2>nul
167+
del /s /f /q "%windir%\Logs\*.log" >nul 2>nul
168+
del /s /f /q "%localappdata%\Microsoft\Windows\WebCache\*.log" >nul 2>nul
169+
del /s /f /q "%localappdata%\Microsoft\Windows\INetCache\*.log" >nul 2>nul
170+
171+
:: Clear event logs
172+
echo [Cleaning] Event Logs...
173+
echo.
174+
for /f "tokens=*" %%L in ('wevtutil el') do (
175+
wevtutil cl "%%L" >nul 2>nul
176+
)
166177

167178
echo [Cleaning] Remnant Driver Files && color 9
168179
timeout /t 2 /nobreak >nul
169180
echo.
170181

171-
rem Delete Remnant Driver Files (Not needed because already installed)
182+
172183
del /s /f /q %SYSTEMDRIVE%\AMD\*.* >nul 2>nul
173184
del /s /f /q %SYSTEMDRIVE%\NVIDIA\*.* >nul 2>nul
174185
del /s /f /q %SYSTEMDRIVE%\INTEL\*.* >nul 2>nul
175186

176-
177187
echo [Cleaning] Windows Defender Cache/Logs && color 3
178188
timeout /t 2 /nobreak >nul
179189
echo.
@@ -204,7 +214,8 @@ echo [Enabling] Ultimate Performance Mode && color b
204214
timeout /t 2 /nobreak >nul
205215
echo.
206216

207-
echo Successfully Enabled Ultimate Performance Mode ! && color c
217+
color a
218+
echo Successfully Enabled Ultimate Performance Mode !
208219
timeout /t 2 /nobreak >nul
209220
echo.
210221

@@ -213,6 +224,7 @@ powercfg -duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61 95533644-e700-4a7
213224
powercfg -setactive 95533644-e700-4a79-a56c-a89e8cb109d9 >nul 2>nul
214225

215226
:clear-error
227+
color c
216228
echo Unfortunately, we were unable to remove all of the Temporary files (some are being used by other processes).
217229
echo You can manually open the Temporary Folders and try to delete the remaining files.
218230
echo.
@@ -233,7 +245,7 @@ goto menu
233245

234246
:good-to-go
235247
cls
236-
echo Your PC doesn't need any cleaning. Your PC is good to go!
248+
echo Your PC doesn't need any cleaning try again later.
237249
pause
238250
goto menu
239251

0 commit comments

Comments
 (0)