This script is made to easy the job of desktop Engineers.
Follow the steps explained below:
- First Create a text file with name IT_HelpDesk_Cleanup_Utility
- Copy paste below script content to the file.
+++++++++++++++++++++++Script Starts Here+++++++++++++++++++++++++
@echo off
cls
echo ---------------------------------------------------------
echo ---------------------------------------------------------
echo ---------------------------------------------------------
echo ---------------------------------------------------------
echo ---------------------------------------------------------
echo ---------------------------------------------------------
echo ---- ****** **** IT HelpDesk Cleanup Utility ----
echo ---- ----
echo ---- Contact Information: ithelpdesk@**********.com ----
echo ---- ----
echo ---- Ph: ***-***-*** ----
echo ---------------------------------------------------------
echo ---------------------------------------------------------
echo ---------------------------------------------------------
echo ---------------------------------------------------------
echo ---------------------------------------------------------
pause
cls
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: The next lines wipe out the temp directories in standard locations
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::
del /s /q /f %TEMP%
del /s /q /f "c:\temp\*"
del /s /q /f "C:\RECYCLER\*"
del /s /q /f "D:\RECYCLER\*"
del /s /q /f "C:\Windows\Prefetch\*"
del /s /q /f "C:\Windows\Temp\*"
del /s /q /f "%UserProfile%\Local Settings\Temp\*"
del /s /q /f "%UserProfile%\Local Settings\Temporary Internet Files\*"
del /s /q /f "C:\WINDOWS\Downloaded Installations\*
del /s /q /f "C: WINDOWS\SoftwareDistribution\Download\*
del /s /q /f "C:\Windows\pchealth\helpctr\Datacoll\*"
del /s /q /f "C:\winnt\Recent\*
del /s /q /f "c:\*.chk"
PUSHD C:\RECYCLER
IF /I "%CD%"=="C:\RECYCLER" RD /S /Q "C:\RECYCLER" 2>NUL
POPD
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
PUSHD D:\RECYCLER
IF /I "%CD%"=="D:\RECYCLER" RD /S /Q "D:\RECYCLER" 2>NUL
POPD
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo ---------------------------------------------------------
echo ---------------------------------------------------------
echo ---------------------------------------------------------
echo ---------------------------------------------------------
echo ---------------------------------------------------------
echo --------This Process may take up to 45 Min to an Hour----
echo ---------------------------------------------------------
echo ---------------------------------------------------------
echo ---------------------------------------------------------
echo ---------------------------------------------------------
echo ---------------------------------------------------------
pause
cls
echo Y|chkdsk C: /F
echo Y|chkdsk D: /F
echo ---------------------------------------------------------
echo ---------------------------------------------------------
echo ---------------------------------------------------------
echo ---------------------------------------------------------
echo ---------------------------------------------------------
cleanmgr.exe /sagerun:99
echo ---------------------------------------------------------
echo ---------------------------------------------------------
echo ---------------------------------------------------------
echo ---------------------------------------------------------
echo ---------------------------------------------------------
defrag C: -f
defrag D: -f
+++++++++++++++++++++++Script Ends Here+++++++++++++++++++++++++
- Edit Email id "ithelpdesk@**********.com" & Phone number "Ph: ***-***-***" in script
- Save Script as dos batch file with name IT_HelpDesk_Cleanup_Utility.bat
- If you need ready made script click here to download
- Note extension of file here is .bat which is dos batch file extension.
- copy this file to your USB flash drive & you are ready just double click the file & it will do the cleanup job for you
No comments:
Post a Comment