XP、WIN7系统垃圾清理工作原理

主要清理了系统缓存文件,日志文件,回收站等不必要的系统垃圾文件。 此为XP清理的原码: @echo off color 0A pause echo 正在清理系统垃圾文件,请稍等...... del /f /s /q %systemdrive%\*.tmp del

  主要清理了系统缓存文件,日志文件,回收站等不必要的系统垃圾文件。

  

  此为XP清理的原码:

  @echo off

  color 0A

  pause

  echo 正在清理系统垃圾文件,请稍等......

  del /f /s /q %systemdrive%\*.tmp

  del /f /s /q %systemdrive%\*._mp

  del /f /s /q %systemdrive%\*.log

  del /f /s /q %systemdrive%\*.gid

  del /f /s /q %systemdrive%\*.chk

  del /f /s /q %systemdrive%\*.old

  del /f /s /q %systemdrive%\recycled\*.*

  del /f /s /q %windir%\*.bak

  del /f /s /q %windir%\prefetch\*.*

  rd /s /q %windir%\temp & md %windir%\temp

  del /f /q %userprofile%\cookies\*.*

  del /f /q %userprofile%\recent\*.*

  del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"

  del /f /s /q "%userprofile%\Local Settings\Temp\*.*"

  del /f /s /q "%userprofile%\recent\*.*"

  echo 清理系统垃圾完成!

  echo. & pause

  此为WIN7清理的原码:

  @echo off

  color 0A

  pause

  taskkill /f /im explorer.exe

  del /f /s /q %systemdrive%\*.tmp

  del /f /s /q %systemdrive%\*._mp

  rd /s /q %windir%\temp & md %windir%\temp

  del /f /s /q "%userprofile%\local settings\temp\*.*"

  del /f /s /q %windir%\prefetch\*.*

  del /f /s /q %systemdrive%\*.log

  del /f /s /q %systemdrive%\*.gid

  del /f /s /q %systemdrive%\*.chk

  del /f /s /q %windir%\*.bak

  del /f /s /q %systemdrive%\*.old

  del /f /s /q c:\$recycle.bin\*.*

  del /f /s /q d:\$recycle.bin\*.*

  del /f /s /q e:\$recycle.bin\*.*

  del /f /s /q f:\$recycle.bin\*.*

  del /f /s /q g:\$recycle.bin\*.*

  rd /s /q %windir%\SoftwareDistribution\Download & md %windir%\SoftwareDistribution\Download

  del /f /q "%userprofile%\AppData\Roaming\Microsoft\Windows\Cookies\*.*"

  del /f /s /q "%userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files\*.*"

  del /f /s /q "%userprofile%\AppData\Roaming\Microsoft\Windows\Recent\*.*"

  start explorer

  此为WIN7任务栏图标清理的原码:

  @echo off

  color 0A

  pause

  taskkill /f /im explorer.exe

  attrib -h -s -r "%userprofile%\AppData\Local\IconCache.db"

  del /f "%userprofile%\AppData\Local\IconCache.db"

  attrib /s /d -h -s -r "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\*"

  del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_32.db"

  del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_96.db"

  del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_102.db"

  del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_256.db"

  del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_1024.db"

  del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_idx.db"

  del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_sr.db"

  echo y|reg delete "HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify" /v IconStreams

  echo y|reg delete "HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify" /v PastIconsStream

  start explorer



上一篇:系统垃圾清理教程   |  下一篇:金山卫士让系统不再“慢两拍”