Heheh, those things are not systematic and not comprehensive. We can make one that can automatically update the database and is comprehensive, and make it modular. For example, cleaning the folder is a function, and then read an ini file to call this function. In this way, users can add the content they need by themselves. Just cleaning files is not enough; it should also include registry and third-party software cleaning. I mention the importance of CCleaner because CCleaner is comprehensive. It really covers everything.
The version of moderator namejm is too little, too basic.
@echo off
color f0
echo.
echo 正在安全地自动清除垃圾文件……
del /f /q %systemdrive%\*.tmp>nul 2>nul
del /f /q %systemdrive%\*._mp>nul 2>nul
del /f /q %systemdrive%\*.log>nul 2>nul
del /f /q %systemdrive%\*.gid>nul 2>nul
del /f /q %systemdrive%\*.chk>nul 2>nul
del /f /q %systemdrive%\*.old>nul 2>nul
del /f /q %windir%\*.bak>nul 2>nul
del /f /q %windir%\*.tmp>nul 2>nul
del /f /q %windir%\prefetch\*.*>nul 2>nul
del /f /s /q %systemdrive%\recycled\*.*
del /f /q "%ALLUSERSPROFILE%\Documents\DrWatson\*.*">nul 2>nul
del /f /q "%USERPROFILE%\Cookies\*.txt">nul 2>nul
del /f /q /s "%TEMP%\*.*">nul 2>nul
del /f /q /s "%Systemroot%\Prefetch\*.*">nul 2>nul
del /f /q "%USERPROFILE%\Recent\*.*">nul 2>nul
del /f /q "%USERPROFILE%\Application Data\Microsoft\Office\Recent\*.lnk">nul 2>nul
del /f /q /s "%USERPROFILE%\Local Settings\Temp\*.*">nul 2>nul
rd /s /q %windir%\temp & md %windir%\temp>nul 2>nul
if not exist %SystemRoot%\Minidump\NUL del /f /q /s %SystemRoot%\Minidump\*.*>nul 2>nul
del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*">nul 2>nul
And the temporary file directories collected in CCleaner are not at the same level as the above batch script. Here is a
rough one, which can be used as a reference and also comes from CCleaner's data. Don't say I infringe on copyright, I'm just "academic discussion"
FileKey1=%userprofile%\Local Settings\Application Data\Adobe\Acrobat\7.0\Cache\Search70|*.*
FileKey2=%ProgramFiles%\Adobe\Acrobat 7.0\Reader|*.bak
FileKey3=%ProgramFiles%\Adobe\Acrobat 7.0\ActiveX|*.bak
FileKey4=%ProgramFiles%\Adobe\Acrobat 7.0\Reader\plug_ins|*.bak
FileKey5=%ProgramFiles%\Adobe\Acrobat 7.0\Reader\Updater|*.bak
FileKey1=%appdata%\Adobe\CameraRaw\Cache|*.*
FileKey1=%appdata%\Google\Local Search History|*.*
FileKey1=%appdata%\Real\RealOne Player|cookies.txt
FileKey2=%appdata%\Real\RealOne Player|ctd.dat
FileKey3=%appdata%\Real\RealOne Player|realplayer.ste
FileKey4=%appdata%\Real\RealOne Player\History|*.*
FileKey5=%appdata%\Real\RealPlayer|cookies.txt
FileKey6=%appdata%\Real\RealPlayer|ctd.dat
FileKey7=%appdata%\Real\RealPlayer|realplayer.ste
FileKey8=%appdata%\Real\RealPlayer\History|*.*
FileKey9=%ProgramFiles%\Common Files\Real\Update_OB|RealPlayer-log.txt
FileKey1=%userprofile%|QTPlayerSession.xml
FileKey2=%appdata%\Apple Computer\QuickTime|QTPlayerSession.xml
FileKey1=%userprofile%\Local Settings\Application Data\Apple Computer\QuickTime\downloads|*.*|RECURSE
FileKey1=%appdata%\Microsoft\Office\Recent|*.*
FileKey1=%appdata%\Microsoft\Office\Recent|*.*
FileKey1=%appdata%\Microsoft\Office\Recent|*.*
FileKey1=%appdata%\Macromedia\Flash Player|*.*|RECURSE
FileKey1=%allusersprofile%\Application Data\Symantec\Norton AntiVirus Corporate Edition\7.5\Logs|*.log
FileKey2=%userprofile%\Local Settings\Application Data\Symantec\Norton AntiVirus Corporate Edition\7.5\Logs|*.log
FileKey3=%allusersprofile%\Application Data\Symantec\LiveUpdate\Downloads|*.*
FileKey1=%allusersprofile%\Application Data\Symantec\Symantec AntiVirus Corporate Edition\7.5\Logs|*.log
FileKey2=%userprofile%\Local Settings\Application Data\Symantec\Symantec AntiVirus Corporate Edition\7.5\Logs|*.log
FileKey3=%allusersprofile%\Application Data\Symantec\LiveUpdate\Downloads|*.*
FileKey1=%userprofile%\Local Settings\Application Data\Microsoft\Terminal Server Client\Cache|*.*
FileKey1=%ProgramFiles%\Ahead\Nero|NeroHistory.log
FileKey1=%allusersprofile%\Application Data\Spybot - Search & Destroy\Logs|*.*
FileKey2=%ProgramFiles%\Spybot - Search & Destroy|advdebug.txt
FileKey3=%allusersprofile%\Application Data\Spybot - Search & Destroy|Statistics.ini
FileKey4=%windir%\All Users\Application Data\Spybot - Search & Destroy\Logs|*.*
FileKey5=%windir%\All Users\Application Data\Spybot - Search & Destroy|Statistics.ini
FileKey1=%ProgramFiles%\Lavasoft\Ad-Aware SE Personal|defs.ref.old
FileKey2=%userprofile%\Application Data\Lavasoft\Ad-Aware\Logs|*.txt
FileKey1=%ProgramFiles%\Lavasoft\Ad-Aware SE Professional|defs.ref.old
FileKey2=%userprofile%\Application Data\Lavasoft\Ad-Aware\Logs|*.txt
FileKey1=%ProgramFiles%\Lavasoft\Ad-Aware SE Plus|defs.ref.old
FileKey2=%userprofile%\Application Data\Lavasoft\Ad-Aware\Logs|*.txt
FileKey1=%ProgramFiles%\Webroot\Spy Sweeper\Temp|*.*
FileKey2=%userprofile%\Application Data\Webroot\Spy Sweeper\Logs|*Log.txt
FileKey1=%ProgramFiles%\Driver Cleaner Pro\Log|*.log
FileKey1=%ProgramFiles%\Netscape\Users\default|netscape.hst
FileKey2=%ProgramFiles%\Netscape\Users\default|cookies.txt
FileKey3=%ProgramFiles%\Netscape\Users\default\cache|*.*
FileKey1=%userprofile%\Application Data\Axialis\Temporary Preview Files|*.*|RECURSE
FileKey1=%ProgramFiles%\eMule\config|AC_SearchStrings.dat
FileKey1=%ProgramFiles%\eMule\config|known.met
FileKey2=%ProgramFiles%\eMule\config|known2.met
FileKey1=%userprofile%\Application Data\Sun\Java\Deployment\cache|*.*|RECURSE
FileKey2=%userprofile%\Application Data\Sun\Java\Deployment\javaws\cache|*.*|RECURSE
FileKey1=%userprofile%\Local Settings\Application Data\Microsoft\Movie Maker|MEDIATAB0.DAT
FileKey1=%ProgramFiles%\GetRight|GetRight.hst
FileKey1=%ProgramFiles%\DAP\Temp|*.*
FileKey2=%ProgramFiles%\DAP\Ads|*.*
FileKey3=%ProgramFiles%\DAP\Log|*.*
FileKey1=%userprofile%\Local Settings\Application Data\TiVo Desktop\Cache|*.*
FileKey1=%ProgramFiles%\CA\eTrust Internet Security Suite\eTrust EZ Antivirus|*.log
FileKey2=%ProgramFiles%\CA\eTrust Internet Security Suite\eTrust EZ Antivirus|*log.txt
FileKey3=%ProgramFiles%\CA\eTrust Internet Security Suite\eTrust EZ Antivirus\ArcTemp|*.tmp
FileKey4=%allusersprofile%\Application Data\CA\Consumer\AV|*.tmp|RECURSE
FileKey5=%allusersprofile%\Application Data\CA\Consumer\AV|*.txt|RECURSE
FileKey6=%allusersprofile%\Application Data\CA\Consumer\CCube|*.tmp|RECURSE
FileKey7=%allusersprofile%\Application Data\CA\Consumer\CCube|*.txt|RECURSE
FileKey8=%allusersprofile%\Application Data\CA\Consumer\ISS\FeedStore|*.txt|RECURSE
FileKey9=%ProgramFiles%\CA\CA Internet Security Suite\CA Anti-Virus\ArcTemp|*.*
FileKey10=%ProgramFiles%\CA\CA Internet Security Suite\CA Anti-Virus\tmp|*.*
FileKey1=%windir%\Internet Logs|ZALog*.*
FileKey1=%userprofile%\Application Data\Google\GoogleEarth|dbcache.dat
FileKey2=%userprofile%\Application Data\Google\GoogleEarth|dbcache.dat.index
FileKey1=%ProgramFiles%\Microsoft AntiSpyware|errors.log
FileKey2=%ProgramFiles%\Microsoft AntiSpyware|tracksEraser.log
FileKey3=%ProgramFiles%\Microsoft AntiSpyware|cleaner.log
FileKey1=%allusersprofile%\Application Data\Raxco\PerfectDisk\7.0|PerfectDisk.log
FileKey1=%userprofile%\Application Data\Azureus\logs|*.log
FileKey2=%userprofile%\Application Data\Azureus\logs\save|*.log
FileKey1=%userprofile%\Local Settings\Application Data\GlobalSCAPE\CuteFTP Pro\7.0\Cache|*.*|RECURSE
FileKey2=%userprofile%\Local Settings\Application Data\GlobalSCAPE\CuteFTP Pro\7.0\CacheThumbs|*.*|RECURSE
FileKey1=%userprofile%\Local Settings\Application Data\GlobalSCAPE\CuteFTP\7.0\Cache|*.*|RECURSE
FileKey2=%userprofile%\Local Settings\Application Data\GlobalSCAPE\CuteFTP\7.0\CacheThumbs|*.*|RECURSE
FileKey1=%userprofile%\Local Settings\Application Data\GlobalSCAPE\CuteFTP Pro\8.0\Cache|*.*|RECURSE
FileKey2=%userprofile%\Local Settings\Application Data\GlobalSCAPE\CuteFTP Pro\8.0\CacheThumbs|*.*|RECURSE
FileKey1=%userprofile%\Local Settings\Application Data\GlobalSCAPE\CuteFTP\8.0\Cache|*.*|RECURSE
FileKey2=%userprofile%\Local Settings\Application Data\GlobalSCAPE\CuteFTP\8.0\CacheThumbs|*.*|RECURSE
FileKey1=%allusersprofile%\.clamwin\log|*.*
FileKey2=%userprofile%\.clamwin\log|*.*
FileKey3=%windir%\All Users\.clamwin\log|*.*
FileKey1=%ProgramFiles%\Ewido\Security Suite|logfile.txt
FileKey2=%ProgramFiles%\Ewido Anti-Malware|logfile.txt
FileKey1=%ProgramFiles%\Grisoft\AVG Anti-Spyware 7.5|logfile.txt
FileKey1=%ProgramFiles%\OpenOffice.org1.1.4\user\registry\data\org\openoffice\Office|Common.xcu
FileKey1=%appdata%\OpenOffice.org2\user\registry\data\org\openoffice\Office|Common.xcu
FileKey1=%allusersprofile%\Application Data\Grisoft\Avg7Data|*.log
FileKey2=%allusersprofile%\Application Data\Grisoft\Avg7Data\upd7bin|*.*
FileKey3=%allusersprofile%\Application Data\Grisoft\Avg7Data\$history|*.*
FileKey4=%allusersprofile%\Application Data\Grisoft\Avg7Data\avg7upd|*.log
FileKey5=%windir%\All Users\Application Data\Grisoft\Avg7Data\upd7bin|*.*
FileKey6=%windir%\All Users\Application Data\Grisoft\Avg7Data\avg7upd|$history
FileKey7=%windir%\All Users\Application Data\Grisoft\Avg7Data\avg7upd|*.log
FileKey8=%windir%\All Users\Application Data\Grisoft\Avg7Data|*.log
FileKey9=%windir%\Application Data\AVG7\Log|*.log
FileKey1=%ProgramFiles%\AVPersonal\AVTEST|*.*
FileKey2=%ProgramFiles%\AVPersonal\FAILSAVE|*.*
FileKey3=%ProgramFiles%\AVPersonal\INFECTED|*.*
FileKey4=%ProgramFiles%\AVPersonal\LOGFILES|*.*
FileKey5=%ProgramFiles%\AVPersonal\SYSSAVE|*.*
FileKey6=%ProgramFiles%\AVPersonal\TEMP|*.*
FileKey7=%ProgramFiles%\AVPersonal\TESTPATH|*.*
FileKey8=%ProgramFiles%\AVPersonal\UPDATE|*.*
FileKey1=%allusersprofile%\Application Data\Microsoft\Windows Defender\Scans\History\Results\Quick|*.*
FileKey2=%allusersprofile%\Application Data\Microsoft\Windows Defender\Scans\History\Results\Resource|*.*
RegKey1=HKCU\Software\Microsoft\Internet Explorer\TypedURLs
RegKey2=HKCU\Software\Microsoft\Internet Explorer\Explorer Bars\{C4EE31F3-4768-11D2-BE5C-00A0C9A83DA1}\FilesNamedMRU
RegKey3=HKCU\Software\Microsoft\Internet Explorer\Explorer Bars\{C4EE31F3-4768-11D2-BE5C-00A0C9A83DA1}\ContainingTextMRU
RegKey1=HKCU\Software\Microsoft\Internet Explorer|Download Directory
RegKey2=HKCU\Software\Microsoft\Internet Explorer\Main|Save Directory
RegKey1=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs
RegKey1=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU
RegKey1=HKCU\Software\Microsoft\Search Assistant\ACMru
RegKey1=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32
RegKey2=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FindComputerMRU
RegKey3=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\PrnPortsMRU
RegKey4=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Map Network Drive MRU
RegKey5=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComputerDescriptions
RegKey6=HKLM\Software\Microsoft\Direct3D\MostRecentApplication|Name
RegKey7=HKCU\Software\Microsoft\Direct3D\MostRecentApplication|Name
RegKey8=HKLM\Software\Microsoft\DirectDraw\MostRecentApplication|Name
RegKey9=HKCU\Software\Microsoft\DirectInput\MostRecentApplication|Id
RegKey10=HKCU\Software\Microsoft\DirectInput\MostRecentApplication|Name
RegKey1=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder
RegKey1=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\TrayNotify|IconStreams
RegKey2=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\TrayNotify|PastIconsStream
RegKey1=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\StreamMRU
RegKey2=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams
RegKey1=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{5E6AB780-7743-11CF-A12B-00AA004AE837}\Count
RegKey2=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{75048700-EF1F-11D0-9888-006097DEACF9}\Count
Detect=HKCU\SOFTWARE\Microsoft\Internet Explorer
Detect=HKCU\SOFTWARE\Microsoft\Internet Explorer
Detect=HKCU\SOFTWARE\Microsoft\Internet Explorer
Detect=HKCU\SOFTWARE\Microsoft\Internet Explorer
Detect=HKCU\SOFTWARE\Microsoft\Internet Explorer
Detect=HKCU\SOFTWARE\Microsoft\Internet Explorer
Detect=HKCU\SOFTWARE\Microsoft\Internet Explorer
Detect=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OptimalLayout
Detect=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\TrayNotify
Detect=HKLM\System\CurrentControlSet\Services\w3svc
More detailed ones are in the installation directory of CCleaner. Due to copyright issues, I can't post them directly. You can download one and have a look.
[
Last edited by electronixtar on 2006-10-23 at 08:51 ]
C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"