@echo off rem 5:01 PM 10/21/2005 : fixed %temp% issue recreates %temp% after delete no reboot required cls echo THE CLEANER 2.2 echo cleans up temp/startup/recycle bin ( for all users ) and registry/startup items (optional) echo http://rmccurdy.no-ip.com/ pause cls echo REGEDIT4 > %temp%\showhidden.reg echo [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] >> %temp%\showhidden.reg echo "Hidden"=dword:00000001 >> %temp%\showhidden.reg echo "HideFileExt"=dword:00000000 >> %temp%\showhidden.reg echo "ShowSuperHidden"=dword:00000001 >> %temp%\showhidden.reg regedit /r %temp%\showhidden.reg regedit /s %temp%\showhidden.reg echo REGEDIT4 > c:\clean.reg echo [-HKEY_LOCAL_MACHINE\SOFTWARE\CLASSES\Software\Microsoft\Windows\CurrentVersion\Run] >> c:\clean.reg echo [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run] >> c:\clean.reg echo [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx] >> c:\clean.reg echo [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce] >> c:\clean.reg echo [-HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Run] >> c:\clean.reg echo [-HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Runonce] >> c:\clean.reg echo [-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run] >> c:\clean.reg echo [-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce] >> c:\clean.reg echo [-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx] >> c:\clean.reg echo [-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServicesOnce] >> c:\clean.reg echo [-HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Runonce] >> c:\clean.reg echo Running AUTO CLEAN this may take a while... ping 1.1.1.1 > null del null rd /s /q c:\winnt\temp rd /s /q c:\recycled rd /s /q c:\windows\tempor~1\*.??? rd /s /q c:\windows\temp\*.??? del c:\windows\*.tmp rd /s /q c:\windows\recent\*.??? rd /s /Q C:\RECYCLER rd /s /Q E:\RECYCLER rd /s /Q F:\RECYCLER rd /s /Q C:\recycled rd /s /Q E:\recycled rd /s /Q F:\recycled DEL /A:H /F /S /Q C:\RECYCLER DEL /A:H /F /S /Q D:\RECYCLER DEL /A:H /F /S /Q E:\RECYCLER DEL /A:H /F /S /Q F:\RECYCLER DEL /A:H /F /S /Q C:\recycled DEL /A:H /F /S /Q D:\recycled DEL /A:H /F /S /Q E:\recycled DEL /A:H /F /S /Q F:\recycled goto root1 :root1 set vartemp=%temp% SET SRC1=%SYSTEMDRIVE%\Documents and Settings SET SRC2=Local Settings\Temporary Internet Files\Content.IE5 SET SRC3=Local Settings\History SET SRC4=Local Settings\Temp SET SRC5=Start Menu\Programs\Startup SET SRC6=Cookies SET SRC7=Recent SET SRC8=Local Settings FOR /D %%X IN ("%SRC1%\*") DO FOR /D %%Y IN ("%%X\%SRC2%\*.*") DO RMDIR /S /Q "%%Y" FOR /D %%X IN ("%SRC1%\*") DO FOR /D %%Y IN ("%%X\%SRC2%\*.*") DO DEL /F /S /Q "%%Y" FOR /D %%X IN ("%SRC1%\*") DO FOR %%Y IN ("%%X\%SRC2%\*.*") DO DEL /A:H /F /S /Q "%%Y" FOR /D %%X IN ("%SRC1%\*") DO FOR /D %%Y IN ("%%X\%SRC3%\*.*") DO RMDIR /S /Q "%%Y" FOR /D %%X IN ("%SRC1%\*") DO FOR %%Y IN ("%%X\%SRC3%\*.*") DO DEL /F /S /Q "%%Y" FOR /D %%X IN ("%SRC1%\*") DO FOR %%Y IN ("%%X\%SRC3%\*.*") DO DEL /A:H /F /S /Q "%%Y" FOR /D %%X IN ("%SRC1%\*") DO FOR %%Y IN ("%%X\%SRC4%\*.*") DO DEL /F /S /Q "%%Y" FOR /D %%X IN ("%SRC1%\*") DO FOR %%Y IN ("%%X\%SRC4%\*.*") DO DEL /A:H /F /S /Q "%%Y" FOR /D %%X IN ("%SRC1%\*") DO FOR /D %%Y IN ("%%X\%SRC6%\*.*") DO RMDIR /S /Q "%%Y" FOR /D %%X IN ("%SRC1%\*") DO FOR %%Y IN ("%%X\%SRC6%\*.*") DO DEL /F /S /Q "%%Y" FOR /D %%X IN ("%SRC1%\*") DO FOR %%Y IN ("%%X\%SRC6%\*.*") DO DEL /A:H /F /S /Q "%%Y" FOR /D %%X IN ("%SRC1%\*") DO FOR /D %%Y IN ("%%X\%SRC7%\*.*") DO RMDIR /S /Q "%%Y" FOR /D %%X IN ("%SRC1%\*") DO FOR %%Y IN ("%%X\%SRC7%\*.*") DO DEL /F /S /Q "%%Y" FOR /D %%X IN ("%SRC1%\*") DO FOR %%Y IN ("%%X\%SRC7%\*.*") DO DEL /A:H /F /S /Q "%%Y" FOR /D %%X IN ("%SRC1%\*") DO FOR /D %%Y IN ("%%X\%SRC8%\*.*") DO RMDIR /S /Q "%%Y" FOR /D %%X IN ("%SRC1%\*") DO FOR %%Y IN ("%%X\%SRC8%\*.*") DO DEL /F /S /Q "%%Y" FOR /D %%X IN ("%SRC1%\*") DO FOR %%Y IN ("%%X\%SRC8%\*.*") DO DEL /A:H /F /S /Q "%%Y" mkdir "%vartemp%" echo %vartemp% rd /s /q c:\temp rd /s /q c:\windows\temp rd /s /q c:\winnt\temp :wipestartup cls echo ****************************************** echo WARNING : IF YOU WANT TO KEEP YOUR STARTUP ENTRIES PLEASE CLOSE THIS WINDOW NOW echo RUN THIS IF YOU HAVE MORE THEN 4 ICONS IN THE LOWER RIGHT NEAR THE TIME echo ****************************************** PAUSE echo backing up registry to c:\backup.reg c:\winnt\regedit /E c:\backup.reg c:\windows\regedit /E c:\backup.reg regedit /r c:\clean.reg regedit /s c:\clean.reg cd c:\documents and settings\ FOR /D %%X IN ("%SRC1%\*") DO FOR %%Y IN ("%%X\%SRC5%\*.*") DO DEL /F /S /Q "%%Y" FOR /D %%X IN ("%SRC1%\*") DO FOR %%Y IN ("%%X\%SRC5%\*.*") DO DEL /A:H /F /S /Q "%%Y" FOR /D %%X IN ("%SRC1%\*") DO FOR /D %%Y IN ("%%X\%SRC5%\*.*") DO RMDIR /S /Q "%%Y" exit