11@ echo off
2- mode con cols=122 lines=40
2+ mode con cols=129 lines=40
33chcp 65001
44cls
55
@@ -50,12 +50,12 @@ echo [40;31m ╚╗╔╗╔╝╔╣╠╗║║ ║║║╔╝╚╝║║
5050echo [40;31m ╚╝╚╝ ╚══╝╚╝ ╚═╝╚═══╝╚═══╝ ╚╝╚╝ ╚═══╝ [40;34m ╚═══╝╚═══╝╚═══╝╚╝ ╚╝╚╝ ╚═╝╚═══╝╚╝╚═╝ [40;31m ╚═══╝ ╚══╝ ╚══╝╚═══╝╚══╝ ╚══╝ ╚╝
5151echo .
5252echo .
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
5959echo .
6060echo [40;32m Press a button from 1 to 5 - each of these buttons has its own function as described below:
6161echo .
@@ -89,7 +89,7 @@ DISM /Online /Cleanup-Image /RestoreHealth
8989cls
9090echo Windows Repaired Successfully!
9191echo --------------------------------------------------
92- echo Press ENTER KEY yo Continue.
92+ echo Press ENTER KEY to Continue.
9393echo --------------------------------------------------
9494pause > nul
9595goto menu
@@ -115,65 +115,75 @@ if %errorlevel%==2 exit
115115:clear
116116rem 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-
124118echo [Cleaning] and Optimizations in progress...
125119timeout /t 2 /nobreak > nul
126120echo .
127121
128122echo [Cleaning] Temporary Files && color c
129123timeout /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
130135echo .
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
135145del /s /f /q %windir% \temp\*.* > nul 2 > nul
146+ del /s /f /q %LOCALAPPDATA% \CrashDumps\*.* > nul 2 > nul
136147del /s /f /q %windir% \Prefetch\*.* > nul 2 > nul
137148del /s /f /q %LOCALAPPDATA% \Microsoft\Windows\Caches\*.* > nul 2 > nul
138- del /s /f /q %windir% \SoftwareDistribution\Download\*.* > nul 2 > nul
139149del /s /f /q %programdata% \Microsoft\Windows\WER\Temp\*.* > nul 2 > nul
140150del /s /f /q %HomePath% \AppData\LocalLow\Temp\*.* > nul 2 > nul
141151del /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
146155echo [Cleaning] Log Files && color b
147156timeout /t 2 /nobreak > nul
148157echo .
149158
150159REM 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
167178echo [Cleaning] Remnant Driver Files && color 9
168179timeout /t 2 /nobreak > nul
169180echo .
170181
171- rem Delete Remnant Driver Files (Not needed because already installed)
182+
172183del /s /f /q %SYSTEMDRIVE% \AMD\*.* > nul 2 > nul
173184del /s /f /q %SYSTEMDRIVE% \NVIDIA\*.* > nul 2 > nul
174185del /s /f /q %SYSTEMDRIVE% \INTEL\*.* > nul 2 > nul
175186
176-
177187echo [Cleaning] Windows Defender Cache/Logs && color 3
178188timeout /t 2 /nobreak > nul
179189echo .
@@ -204,7 +214,8 @@ echo [Enabling] Ultimate Performance Mode && color b
204214timeout /t 2 /nobreak > nul
205215echo .
206216
207- echo Successfully Enabled Ultimate Performance Mode ! && color c
217+ color a
218+ echo Successfully Enabled Ultimate Performance Mode !
208219timeout /t 2 /nobreak > nul
209220echo .
210221
@@ -213,6 +224,7 @@ powercfg -duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61 95533644-e700-4a7
213224powercfg -setactive 95533644-e700-4a79-a56c-a89e8cb109d9 > nul 2 > nul
214225
215226:clear-error
227+ color c
216228echo Unfortunately, we were unable to remove all of the Temporary files (some are being used by other processes).
217229echo You can manually open the Temporary Folders and try to delete the remaining files.
218230echo .
@@ -233,7 +245,7 @@ goto menu
233245
234246:good-to-go
235247cls
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.
237249pause
238250goto menu
239251
0 commit comments