add custom scripts
This commit is contained in:
parent
ca48a7fbfc
commit
2f9f541c73
2 changed files with 61 additions and 0 deletions
45
windows/ctmpf.bat
Normal file
45
windows/ctmpf.bat
Normal file
|
@ -0,0 +1,45 @@
|
|||
@ECHO off
|
||||
|
||||
:: Start as administrator
|
||||
fltmc >nul 2>&1 || (
|
||||
echo Vous devez lancer le programme en tant qu'administrateur.
|
||||
PowerShell Start -Verb RunAs '%0' 2> nul || (
|
||||
echo Clic droit, Exécuter en tant qu'administrateur
|
||||
pause & exit 1
|
||||
)
|
||||
exit 0
|
||||
)
|
||||
|
||||
echo CTMPF :: Clean TeMPorary Files
|
||||
|
||||
:: Empty the user's temp folder
|
||||
echo Suppression fichiers dans %TEMP%...
|
||||
del /f /q %LOCALAPPDATA%\Temp\* 2> nul
|
||||
rd /s /q "%TEMP%" 2> nul
|
||||
|
||||
|
||||
:: Empty the system's temp folder
|
||||
echo Suppression fichiers dans %WINDIR%\Temp...
|
||||
rd /s /q "%WINDIR%\Temp" 2> nul
|
||||
|
||||
:: Empty the Prefetch folder
|
||||
echo Suppression fichiers dans %WINDIR%\Prefetch...
|
||||
rd /s /q "%WINDIR%\Prefetch" 2> nul
|
||||
|
||||
:: Remove old Windows installation
|
||||
if exist "%SYSTEMDRIVE%\Windows.old" (
|
||||
echo Supprime l'ancienne installation de Windows %SYSTEMDRIVE%\Windows.old...
|
||||
takeown /f "%SYSTEMDRIVE%\Windows.old" /a /r /d y
|
||||
icacls "%SYSTEMDRIVE%\Windows.old" /grant administrators:F /t
|
||||
rd /s /q "%SYSTEMDRIVE%\Windows.old"
|
||||
)
|
||||
|
||||
:: Clear thumbnail cache
|
||||
echo Effacer le cache des miniatures de l'explorateur de fichiers...
|
||||
del /f /s /q /a %LOCALAPPDATA%\Microsoft\Windows\Explorer\*.db
|
||||
|
||||
:: Clean disks
|
||||
echo Nettoyage de l'ordinateur avec cleanmgr...
|
||||
cd %WINDIR%\system32
|
||||
cleanmgr.exe /AUTOCLEAN
|
||||
cleanmgr.exe /VERYLOWDISK
|
16
windows/update.bat
Normal file
16
windows/update.bat
Normal file
|
@ -0,0 +1,16 @@
|
|||
@ECHO off
|
||||
|
||||
:: Start as administrator
|
||||
fltmc >nul 2>&1 || (
|
||||
echo Vous devez lancer le programme en tant qu'administrateur.
|
||||
PowerShell Start -Verb RunAs '%0' 2> nul || (
|
||||
echo Clic droit, Executer en tant qu'administrateur
|
||||
pause & exit 1
|
||||
)
|
||||
exit 0
|
||||
)
|
||||
|
||||
winget upgrade -h --all
|
||||
|
||||
pause
|
||||
exit /b
|
Loading…
Reference in a new issue