@ECHO OFF IF %winbootdir% !==! GOTO ALERT IF EXIST C:\CLEAN.LOG GOTO PREP ECHO HISTORY OF CLEANING OPERATIONS> C:\CLEAN.LOG ECHO ------------------------->> C:\CLEAN.LOG GOTO PREP :PREP MEM /M VMM32 | FIND "K" IF ERRORLEVEL 1 GOTO APPEND GOTO INWINDOW :APPEND %winbootdir%\SMARTDRV.EXE ECHO OPENED:>> C:\CLEAN.LOG ECHO @PROMPT SET DATE=$D$_SET TIME=$T$_ > {A}.BAT %COMSPEC% /E:2048 /C {A}.BAT > {B}.BAT FOR %%V IN ({B}.BAT DEL) DO CALL %%V {?}.BAT ECHO %DATE% %TIME%>> C:\CLEAN.LOG IF EXIST C:\URL.REG GOTO INTRO ECHO REGEDIT4> C:\URL.REG ECHO [-HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs]>> C:\URL.REG GOTO INTRO :INTRO CLS ECHO. ECHO System maintenance utility by Andy Westcott. ECHO -------------------------------------------- ECHO !! FOR WINDOWS 98 ONLY !! ECHO -------------------------------------------- ECHO Version 14.11.22 ECHO Search Google for 'm0wan' to find my website. ECHO. ECHO No guarantee is given or implied by the offering of this software; ECHO Use entirely at your own risk, ensure you have adequate backups. ECHO. ECHO Choose from the following options: ECHO. ECHO Type '1' to remove temporary internet files and other junk. ECHO Type '2' to remove all internet history files. ECHO Type '3' to remove all cookies. ECHO Type '4' to delete all Windows TEMP files. ECHO Type '5' to renew your icon cache. ECHO Type '6' to repair and compact the registry. ECHO Type '7' to perform a scan of your hard drive. ECHO Type '8' to perform opertions 1,2,3,4 and 5 in one go. ECHO Type '9' to close the program and return to MS DOS. :: CHOICE /C:123456789 /N IF ERRORLEVEL == 9 GOTO MSDOS IF ERRORLEVEL == 8 GOTO ALLCLEAN IF ERRORLEVEL == 7 GOTO SCAN IF ERRORLEVEL == 6 GOTO REG IF ERRORLEVEL == 5 GOTO ICON IF ERRORLEVEL == 4 GOTO WTEMP IF ERRORLEVEL == 3 GOTO COOK IF ERRORLEVEL == 2 GOTO HIST IF ERRORLEVEL == 1 GOTO TIF :TIF CLS ECHO. ECHO This operation will clear out a large number of junk files, ECHO as well as the temporary internet cache and its associated ECHO ever-expanding index.dat file, normally invisible and undeletable. ECHO. ECHO This particular clean-up should be performed fairly frequently ECHO to minimise clogging up of the system - perhaps weekly. ECHO. ECHO It is a good idea to delete the temporary internet files from Internet ECHO Explorer first, as otherwise this process can take an extraordinarily ECHO long time to complete as there could be thousands of files to remove. ECHO. ECHO Do not interrupt this process - allow it to complete. ECHO. ECHO Are you sure you want to perform this operation? ECHO. ECHO Press 'Y' to continue, ECHO Press 'N' to return to the main menu. CHOICE /C:YN /N IF ERRORLEVEL == 2 GOTO INTRO @ECHO ON IF EXIST C:\*.CHK DEL C:\*.CHK IF EXIST C:\SCANDISK.LOG DEL C:\SCANDISK.LOG IF EXIST %winbootdir%\FF*.TMP DEL %winbootdir%\FF*.TMP IF EXIST %winbootdir%\RECENT\ DEL %winbootdir%\RECENT\*.* %winbootdir%\COMMAND\DELTREE.EXE /Y C:\TEMP %winbootdir%\COMMAND\DELTREE.EXE /Y %winbootdir%\APPLOG %winbootdir%\COMMAND\DELTREE.EXE /Y %winbootdir%\TEMPOR~1 %winbootdir%\COMMAND\DELTREE.EXE /Y %winbootdir%\LOCALS~1\TEMPOR~1 %winbootdir%\COMMAND\DELTREE.EXE /Y %winbootdir%\TMP %winbootdir%\COMMAND\DELTREE.EXE /Y C:\TMP ECHO --T.I.F. deleted.>> C:\CLEAN.LOG @ECHO OFF @ECHO  CLS ECHO. ECHO. ECHO Job completed. ECHO Junk files and temporary internet cache cleared out. ECHO. ECHO. PAUSE GOTO INTRO :HIST CLS ECHO. ECHO This operation will delete all internet history and the associated ECHO index.dat files, which normally continue to grow with use and can ECHO lead to a slow down of the system. ECHO. ECHO Please note: This operation will cause web sites to no longer show ECHO previously visited links as visited, and will remove all autocomplete ECHO web addresses. ECHO. ECHO It is recommended you perform this operation every few months or so. ECHO. ECHO Are you sure you want to perform this operation? ECHO. ECHO Press 'Y' to continue, ECHO Press 'N' to return to the main menu. CHOICE /C:YN /N IF ERRORLEVEL == 2 GOTO INTRO @ECHO ON %winbootdir%\COMMAND\DELTREE.EXE /Y %winbootdir%\HISTORY\*.* %winbootdir%\COMMAND\DELTREE.EXE /Y %winbootdir%\HISTORY REGEDIT C:\URL.REG ECHO --History deleted.>> C:\CLEAN.LOG @ECHO OFF @ECHO  CLS ECHO. ECHO. ECHO Job completed. ECHO All web site history and autocomplete data cleared out. ECHO. ECHO. PAUSE GOTO INTRO :COOK CLS ECHO. ECHO This operation will delete all cookies and the normally undeletable ECHO index.dat file, which continues to grow with use and could ECHO lead to a slow down of the system. ECHO. ECHO Recommended that you perform this operation every few months or so. ECHO. ECHO Do not interrupt this process - allow it to complete. ECHO. ECHO Please note: Any saved web site log-in details will be lost, ECHO and must be re-entered again when the site is next visited. ECHO. ECHO Are you sure you want to perform this operation? ECHO. ECHO Press 'Y' to continue, ECHO Press 'N' to return to the main menu. CHOICE /C:YN /N IF ERRORLEVEL == 2 GOTO INTRO @ECHO ON %winbootdir%\COMMAND\DELTREE.EXE /Y %winbootdir%\COOKIES\*.* %winbootdir%\COMMAND\DELTREE.EXE /Y %winbootdir%\COOKIES ECHO --Cookies deleted.>> C:\CLEAN.LOG @ECHO OFF @ECHO  CLS ECHO. ECHO. ECHO Job completed. ECHO All cookies cleared out. ECHO. ECHO. PAUSE GOTO INTRO :WTEMP CLS ECHO. ECHO This operation will delete Windows' temporary files. ECHO. ECHO It is a good idea not to run this task if you have ECHO installed any programs on this computer in the last 24 hours, ECHO as some of the files to be deleted may still be needed. ECHO. ECHO Files tend to accumulate in this location unabated, especially ECHO after bad shutdowns or crashes, and much hard drive space can ECHO often be reclaimed by deleting these unneeded files. ECHO. ECHO Recommended you perform this function on a monthly basis, ECHO especially after a computer crash or bad shutdown. ECHO. ECHO Are you sure you want to perform this operation? ECHO. ECHO Press 'Y' to continue, ECHO Press 'N' to return to the main menu. CHOICE /C:YN /N IF ERRORLEVEL == 2 GOTO INTRO @ECHO ON %winbootdir%\COMMAND\DELTREE.EXE /Y %winbootdir%\TEMP\*.* %winbootdir%\COMMAND\DELTREE.EXE /Y %winbootdir%\TEMP MKDIR C:\WINDOWS\TEMP ECHO --Windows Temp deleted.>> C:\CLEAN.LOG @ECHO OFF @ECHO  CLS ECHO. ECHO. ECHO Job completed. ECHO Windows temp folder cleared out. ECHO. ECHO. PAUSE GOTO INTRO :ICON CLS ECHO. ECHO This operation will delete Windows' icon cache, which ECHO will then be re-created upon reboot. This will cause ECHO the desktop icons to appear slowly on the first boot, ECHO but thereafter will save some resources on startup. ECHO. ECHO I recommend this task be performed fairly infrequently, ECHO perhaps once every six months or so. ECHO. ECHO Are you sure you want to perform this operation? ECHO. ECHO Press 'Y' to continue, ECHO Press 'N' to return to the main menu. CHOICE /C:YN /N IF ERRORLEVEL == 2 GOTO INTRO @ECHO ON DEL %winbootdir%\SHELLI~1 ECHO --Icon cache deleted.>> C:\CLEAN.LOG @ECHO OFF @ECHO  CLS ECHO. ECHO. ECHO Job completed. ECHO Your old icon cache has been removed, ECHO and will be rebuilt when you reboot. ECHO. ECHO. PAUSE GOTO INTRO :REG CLS ECHO. ECHO This operation calls into action Microsoft's little-known utility ECHO for repairing and compacting the Windows registry. I recommend ECHO this operation is perfomed infrequently, but particularly after ECHO installing or deleting programs. ECHO. ECHO Be prepared for this operation to take a while on slower computers. ECHO. ECHO Are you sure you want to perform this operation? ECHO. ECHO Press 'Y' to continue, ECHO Press 'N' to return to the main menu. CHOICE /C:YN /N IF ERRORLEVEL == 2 GOTO INTRO CD C:\WINDOWS %winbootdir%\COMMAND\SCANREG.EXE /FIX DEL %winbootdir%\SYSBCKUP\RBBAD.CAB ECHO --Registry compacted.>> C:\CLEAN.LOG @ECHO  CLS ECHO. ECHO. ECHO Job completed. ECHO The registry has been cleaned and compacted. ECHO. PAUSE GOTO INTRO :SCAN CLS ECHO. ECHO This operation runs Microsoft's Scandisk, a useful utility for ECHO checking your hard drive for errors and 'lost clusters', which ECHO are areas of wasted storage space caused by the computer being ECHO incorrectly shut down, or a system crash. ECHO. ECHO This operation may take a while to complete on slower computers. ECHO. ECHO Are you sure you want to perform this operation? ECHO. ECHO Press 'Y' to continue, ECHO Press 'N' to return to the main menu. CHOICE /C:YN /N IF ERRORLEVEL == 2 GOTO INTRO CD C:\WINDOWS %winbootdir%\COMMAND\SCANDISK.EXE /ALL /AUTOFIX /NOSUMMARY ECHO --Scandisk run.>> C:\CLEAN.LOG @ECHO  CLS ECHO. ECHO. ECHO Job completed. ECHO Your hard drive has been scanned for errors. ECHO. PAUSE GOTO INTRO :ALLCLEAN CLS ECHO. ECHO This operation will perform all cleaning options ECHO in one go. ECHO. ECHO For users who know what they are doing. ECHO. ECHO Are you sure you want to perform this operation? ECHO. ECHO Press 'Y' to continue, ECHO Press 'N' to return to the main menu. CHOICE /C:YN /N IF ERRORLEVEL == 2 GOTO INTRO @ECHO ON IF EXIST C:\*.CHK DEL C:\*.CHK IF EXIST C:\SCANDISK.LOG DEL C:\SCANDISK.LOG IF EXIST %winbootdir%\FF*.TMP DEL %winbootdir%\FF*.TMP IF EXIST %winbootdir%\RECENT\ DEL %winbootdir%\RECENT\*.* %winbootdir%\COMMAND\DELTREE.EXE /Y C:\TEMP %winbootdir%\COMMAND\DELTREE.EXE /Y %winbootdir%\APPLOG %winbootdir%\COMMAND\DELTREE.EXE /Y %winbootdir%\TEMPOR~1 %winbootdir%\COMMAND\DELTREE.EXE /Y %winbootdir%\LOCALS~1\TEMPOR~1 %winbootdir%\COMMAND\DELTREE.EXE /Y %winbootdir%\TMP %winbootdir%\COMMAND\DELTREE.EXE /Y C:\TMP %winbootdir%\COMMAND\DELTREE.EXE /Y %winbootdir%\HISTORY\*.* %winbootdir%\COMMAND\DELTREE.EXE /Y %winbootdir%\HISTORY REGEDIT C:\URL.REG %winbootdir%\COMMAND\DELTREE.EXE /Y %winbootdir%\COOKIES\*.* %winbootdir%\COMMAND\DELTREE.EXE /Y %winbootdir%\COOKIES DEL %winbootdir%\SHELLI~1 %winbootdir%\COMMAND\DELTREE.EXE /Y %winbootdir%\TEMP\*.* %winbootdir%\COMMAND\DELTREE.EXE /Y %winbootdir%\TEMP ECHO --Full clearout performed.>> C:\CLEAN.LOG @ECHO OFF @ECHO  CLS ECHO. ECHO. ECHO Job completed. ECHO All cleaning operations performed.. ECHO. ECHO. PAUSE GOTO INTRO :INWINDOW ECHO LAUNCHED FROM WITHIN WINDOWS.>> C:\CLEAN.LOG ECHO @PROMPT SET DATE=$D$_SET TIME=$T$_ > {A}.BAT %COMSPEC% /E:2048 /C {A}.BAT > {B}.BAT FOR %%V IN ({B}.BAT DEL) DO CALL %%V {?}.BAT ECHO %DATE% %TIME%>> C:\CLEAN.LOG ECHO ------------------------->> C:\CLEAN.LOG CLS ECHO. ECHO. ECHO. ECHO. ECHO --------------------------------- ECHO CANNOT BE RUN IN WINDOWS! ECHO --------------------------------- ECHO. ECHO Version 14.11.22 ECHO Latest version available from my web site: ECHO Search Google for 'm0wan' to find it. ECHO. ECHO THIS PROGRAM SHOULD ONLY BE RUN FROM PURE DOS MODE. ECHO. ECHO Many of the files this program is designed to remove ECHO cannot be deleted from within a Windows environment. ECHO. ECHO The program will now exit and the DOS window will be closed. ECHO. ECHO. ECHO. PAUSE CLS EXIT :ALERT CLS ECHO. ECHO This program is incompatible with your installation ECHO and so for safety will not run. ECHO. ECHO This program is intended for Windows 98 systems only. ECHO. ECHO No changes have been made to your system, ECHO and you can now safely terminate this program. ECHO. ECHO. PAUSE GOTO CLOSE :MSDOS ECHO CLOSED:>> C:\CLEAN.LOG ECHO @PROMPT SET DATE=$D$_SET TIME=$T$_ > {A}.BAT %COMSPEC% /E:2048 /C {A}.BAT > {B}.BAT FOR %%V IN ({B}.BAT DEL) DO CALL %%V {?}.BAT ECHO %DATE% %TIME%>> C:\CLEAN.LOG echo ------------------------->> c:\clean.log GOTO CLOSE :CLOSE CLS CD C:\WINDOWS