IT你好技术论坛

标题: [Win_7]一键清理所有垃圾-第二代 [打印本页]

作者: Q_Lucky    时间: 2012-4-6 18:38     标题: [Win_7]一键清理所有垃圾-第二代

发布【windows7一键清理垃圾】
是批处理文件
完美去除所有系统垃圾!绝对无毒!不会导致系统崩溃!请放心使用

[attach]961[/attach]


附带:

制作批处理文件的方法

复制以下内容到记事本,另存为-类型(所有文件)—垃圾清理.bat—完成


非原创,转载自MXC。
主要清理windows7系统产生的垃圾,加快开机速度!
继上一版本错误,没用等问题,修复错误,清理大部分垃圾,清理度达92%!清理位置更加准确,策略更加科学。
点击进入下载-【小幸制作】第二版windows7SP1清理系统垃圾.zip
  1. @echo off
  2. @ ECHO.
  3. @ ECHO.
  4. @ ECHO.              【小幸制作】第二版windows7SP1清理系统垃圾
  5. @ ECHO -----------------------------------------------------------------------
  6. @ ECHO                      继上一版本错误,没用等问题        
  7. @ ECHO                       修复错误,清理大部分垃圾
  8. @ ECHO                 【更具大家的支持觉定是否发布第三版】
  9. @ ECHO                优点:清理位置更加准确,策略更加科学。
  10. @ ECHO -----------------------------------------------------------------------
  11. @ ECHO      
  12. @ ECHO
  13. @ ECHO                           
  14. @ ECHO   
  15. @ ECHO                    
  16. @ ECHO           
  17. @ ECHO                    
  18. @ ECHO.
  19. pause
  20. @echo off
  21. ::修正于2008-07-29
  22. color 2f
  23. Title 系统垃圾文件清理器
  24. echo.
  25. echo  *****  系统垃圾文件清理器  *****
  26. echo         
  27. echo.
  28. echo  本程序特点:
  29. echo      鉴于很多人把IE缓存等文件夹转移到非系统盘,
  30. echo  所以,本程序清理垃圾文件时,首先进行判断系统
  31. echo  的设置。
  32. echo.
  33. echo  优点:清理位置更加准确,策略更加科学。
  34. echo.
  35. echo  开始执行清理……
  36. echo.
  37. echo 正在检查cookies、历史纪录等目录位置(当前用户)……
  38. reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Cache>%temp%\cleantmp.txt
  39. reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Cookies>>%temp%\cleantmp.txt
  40. reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v History>>%temp%\cleantmp.txt
  41. reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v NetHood>>%temp%\cleantmp.txt
  42. reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Recent>>%temp%\cleantmp.txt
  43. echo 正在清理Cookies、IE缓存、历史纪录等(当前用户)……
  44. for /f "tokens=3*" %%a in (%temp%\cleantmp.txt) do (
  45.   for /d %%i in ("%%a %%b\*.*") do rd /s /q "%%i"
  46.   del /a /f /s /q "%%a %%b\*.*"
  47. )
  48. ::跟上面几项未必是重复的(!),也是对当前用户目录
  49. echo 正在清理临时文件 (系统目录)……
  50. del /a /f /s /q "%userprofile%\Locals~1\Tempor~1\*.*"
  51. del /a /f /s /q "%userprofile%\Locals~1\Temp\*.*"
  52. del /a /f /s /q "%userprofile%\cookies\*.*"
  53. del /a /f /s /q "%userprofile%\recent\*.*"
  54. del /a /f /s /q "%Temp%\*.*"
  55. del /a /f /s /q "%Tmp%\*.*"
  56. del /a /f /s /q "%HomePath%\..\IconCache.db"
  57. echo 正在清理系统目录中的垃圾文件 (稍候,需要点时间)……
  58. del /a /f /s /q "%SystemRoot%\*._mp"
  59. del /a /f /s /q "%SystemRoot%\*.bak"
  60. del /a /f /s /q "%SystemRoot%\*.log"
  61. del /a /f /s /q "%SystemRoot%\*.dmp"
  62. del /a /f /s /q "%SystemRoot%\*.gid"
  63. del /a /f /s /q "%SystemRoot%\*.old"
  64. del /a /f /s /q "%SystemRoot%\*.query"
  65. del /a /f /q "%SystemRoot%\*.tmp"
  66. rd /s /q "%SystemRoot%\Downloaded Program Files"
  67. rd /s /q "%SystemRoot%\Offline Web Pages"
  68. rd /s /q "%systemroot%\Connection Wizard"
  69. rd /s /q "%SystemRoot%\SoftwareDistribution\Download"
  70. rd /s /q "%SystemRoot%\Assembly"
  71. rd /s /q "%SystemRoot%\Help"
  72. rd /s /q "%SystemRoot%\ReinstallBackups"
  73. del /a /s /q "%SystemRoot%\inf\*.pnf"
  74. del /a /f /s /q "%SystemRoot%\inf\InfCache.1"
  75. dir %SystemRoot%\inf\*.* /ad/b >%SystemRoot%\vTmp.txt
  76. for /f %%a in (%SystemRoot%\vTmp.txt) do rd /s /q "%SystemRoot%\inf\%%a"
  77. del /a /f /s /q "%SystemRoot%\driver?\*.pnf"
  78. del /a /f /s /q "%SystemRoot%\driver?\InfCache.1"
  79. del /a /f /s /q "%SystemDrive%\driver?\*.pnf"
  80. del /a /f /s /q "%SystemDrive%\driver?\InfCache.1"
  81. rd /s /q "%SystemRoot%\temp" & md "%SystemRoot%\temp"
  82. del /a /f /s /q "%SystemRoot%\Prefetch\*.*"
  83. del /a /f /s /q "%SystemRoot%\minidump\*.*"
  84. echo 正在清除无用的磁盘检错文件 (系统分区)……
  85. del /a /f /q "%SystemDrive%\*.chk"
  86. dir %SystemDrive%\found.??? /ad/b >%SystemRoot%\vTmp.txt
  87. for /f %%a in (%SystemRoot%\vTmp.txt) do rd /s /q "%SystemDrive%\%%a"
  88. echo 正在清理系统升级补丁留下来的反安装目录 (已修正能正确清除)……
  89. dir %SystemRoot%\$*$ /ad/b >%SystemRoot%\vTmp.txt
  90. for /f %%a in (%SystemRoot%\vTmp.txt) do rd /s /q "%SystemRoot%\%%a"
  91. echo 正在清除常见的软件垃圾项目 (按默认目录)……
  92. rd /s /q "%ProgramFiles%\InstallShield Installation Information"
  93. Ren "%ProgramFiles%\Common~1\Real\Update_OB\realsched.exe" realsched.ex_
  94. Del "%ProgramFiles%\Common~1\Real\Update_OB\realsched.exe"
  95. Reg Delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v TkBellExe /f
  96. rd /s /q "%ProgramFiles%\Tencent\QQGame\Download"
  97. taskkill /f /im "TIMPlatform.exe" /t
  98. del /a /f /s /q "%ProgramFiles%\Tencent\QQ\TIMPlatform.exe"
  99. del /a /f /s /q "%ProgramFiles%\Kaspersky Lab\*.tmp"
  100. echo.
  101. echo  全部清理完毕,任意键退出 (注: 若提示文件没找到是正常的)……
  102. del %SystemRoot%\vTmp.txt
复制代码





欢迎光临 IT你好技术论坛 (http://it.o-o.zone/) Powered by Discuz! X1