Tuneup.bat
:: ============================================ :: PHASE 1: DISK CLEANUP :: ============================================ call :log "Phase 1: Disk Cleanup Operations" call :log "----------------------------------"
call :log "[3/12] Emptying Recycle Bin..." rd /s /q %systemdrive%\$Recycle.bin >nul 2>&1 call :log " Recycle Bin emptied."
setlocal enabledelayedexpansion
:: Set log file set LOGFILE="%userprofile%\Desktop\tuneup_log_%date:~-4,4%%date:~-10,2%%date:~-7,2%_%time:~0,2%%time:~3,2%%time:~6,2%.txt" set LOGFILE=%LOGFILE: =0%
:: Header cls echo =============================================================== echo Windows System Tune-up Utility v3.2 echo =============================================================== echo. echo Log file will be saved to: %LOGFILE% echo. echo Starting tune-up at %date% %time% echo =============================================================== echo. pause tuneup.bat
:: ============================================ :: PHASE 3: SYSTEM HEALTH :: ============================================ call :log "Phase 3: System Health Checks" call :log "------------------------------"
call :log "[8/12] Running DISM health restore..." DISM /online /cleanup-image /restorehealth >nul 2>&1 call :log " DISM completed." tuneup.bat
call :log " Privacy items cleaned."
:: Chrome if exist "%localappdata%\Google\Chrome\User Data" ( call :log "[5/12] Clearing Chrome cache..." del /f /s /q "%localappdata%\Google\Chrome\User Data\Default\Cache\*" >nul 2>&1 del /f /s /q "%localappdata%\Google\Chrome\User Data\Default\Code Cache\*" >nul 2>&1 call :log " Chrome cache cleaned." ) tuneup.bat
call :log "[10/12] Checking and fixing disk errors..." chkdsk %systemdrive% /f /r /x >nul 2>&1 call :log " Chkdsk scheduled (will run on next reboot)."