2023-04-05 12:36:58 +02:00
|
|
|
@ECHO OFF
|
2022-12-12 00:08:32 +01:00
|
|
|
|
|
|
|
:: Start as administrator
|
2023-04-05 12:38:43 +02:00
|
|
|
fltmc >NUL 2>&1 || (
|
2023-09-13 11:51:35 +02:00
|
|
|
PowerShell Start -Verb RunAs '%0' 2>NUL || (
|
|
|
|
EXIT 1
|
|
|
|
)
|
|
|
|
EXIT 0
|
2022-12-12 00:08:32 +01:00
|
|
|
)
|
|
|
|
|
2023-02-17 17:13:11 +01:00
|
|
|
ECHO CTMPF :: Clean TeMPorary Files
|
2022-12-12 00:08:32 +01:00
|
|
|
|
|
|
|
:: Empty the user's temp folder
|
2023-02-17 17:15:59 +01:00
|
|
|
ECHO Suppression des fichiers dans %TEMP%...
|
2023-04-05 12:38:43 +02:00
|
|
|
DEL /f /q %LOCALAPPDATA%\Temp\* 2>NUL
|
|
|
|
RMDIR /s /q "%TEMP%" 2>NUL
|
2022-12-12 00:08:32 +01:00
|
|
|
|
|
|
|
:: Empty the system's temp folder
|
2023-02-17 17:15:59 +01:00
|
|
|
ECHO Suppression des fichiers dans %WINDIR%\Temp...
|
2023-04-05 12:38:43 +02:00
|
|
|
RMDIR /s /q "%WINDIR%\Temp" 2>NUL
|
2022-12-12 00:08:32 +01:00
|
|
|
|
|
|
|
:: Empty the Prefetch folder
|
2023-02-17 17:15:59 +01:00
|
|
|
ECHO Suppression des fichiers dans %WINDIR%\Prefetch...
|
2023-04-05 12:38:43 +02:00
|
|
|
RMDIR /s /q "%WINDIR%\Prefetch" 2>NUL
|
2022-12-12 00:08:32 +01:00
|
|
|
|
|
|
|
:: Remove old Windows installation
|
|
|
|
if exist "%SYSTEMDRIVE%\Windows.old" (
|
2023-09-13 11:51:35 +02:00
|
|
|
ECHO Supprime l'ancienne installation de Windows dans %SYSTEMDRIVE%\Windows.old...
|
|
|
|
TAKEOWN /f "%SYSTEMDRIVE%\Windows.old" /a /r /d y
|
|
|
|
ICACLS "%SYSTEMDRIVE%\Windows.old" /grant administrators:F /t
|
|
|
|
RMDIR /s /q "%SYSTEMDRIVE%\Windows.old"
|
2022-12-12 00:08:32 +01:00
|
|
|
)
|
|
|
|
|
2023-07-09 10:46:33 +02:00
|
|
|
:: Empty useless files of Windows
|
|
|
|
ECHO Suppression des fichiers dans C:\$WinREAgent...
|
|
|
|
RMDIR /s /q "C:\$WinREAgent" 2>NUL
|
|
|
|
ECHO Suppression des fichiers dans C:\Recovery...
|
|
|
|
RMDIR /s /q "C:\Recovery" 2>NUL
|
|
|
|
|
2024-02-10 12:06:43 +01:00
|
|
|
:: Empty AMD installer files
|
|
|
|
ECHO Suppression des fichiers dans C:\AMD...
|
|
|
|
RMDIR /s /q "C:\AMD" 2>NUL
|
|
|
|
|
|
|
|
:: Empty Windows generated logs
|
|
|
|
ECHO Suppression des fichiers dans C:\PerfLogs...
|
|
|
|
RMDIR /s /q "C:\PerfLogs" 2>NUL
|
|
|
|
|
2022-12-12 00:08:32 +01:00
|
|
|
:: Clean disks
|
2023-02-17 17:15:59 +01:00
|
|
|
ECHO Nettoyage de l'ordinateur avec cleanmgr...
|
2023-02-17 17:13:11 +01:00
|
|
|
CD %WINDIR%\system32
|
2023-02-17 17:52:53 +01:00
|
|
|
cleanmgr /AUTOCLEAN
|
|
|
|
cleanmgr /VERYLOWDISK
|
2023-02-17 17:13:11 +01:00
|
|
|
|
2023-04-05 12:42:54 +02:00
|
|
|
EXIT /B
|