找回密码
 加入我们

QQ登录

只需一步,快速开始

搜索
查看: 4080|回复: 1

【源码】自动清除电脑垃圾批处理

[复制链接]

1214

主题

352

回帖

11

精华

管理员

菜鸟

积分
93755

贡献奖关注奖人气王精英奖乐于助人勋章

发表于 2010-3-28 10:25:11 | 显示全部楼层 |阅读模式
  1. @echo off
  2. echo 这是正在检查cookies、历史纪录等目录位置(当前用户)……
  3. reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Cache>%temp%\cleantmp.txt
  4. reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Cookies>>%temp%\cleantmp.txt
  5. reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v History>>%temp%\cleantmp.txt
  6. reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v NetHood>>%temp%\cleantmp.txt
  7. reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Recent>>%temp%\cleantmp.txt
  8. echo 这里是 清理当前用户的Cookies,IE缓存,历史纪录等……
  9. for /f "tokens=3*" %%i in (%temp%\cleantmp.txt) do (
  10. for /d %%i in ("%%i %%b\*.*") do rd /q /s "%%i">Nul 2>Nul
  11. del /a /f /s /q "%%i %%b\*.*">Nul 2>Nul
  12. )
  13. echo 这里清理系统临时垃圾文件……
  14. del /a /f /s /q "%userprofile%\Locals~1\Tempor~1\*.*" >Nul 2>Nul
  15. del /a /f /s /q "%userprofile%\Locals~1\Temp\*.*" >Nul 2>Nul
  16. del /a /f /s /q "%userprofile%\cookies\*.*" >Nul 2>Nul
  17. del /a /f /s /q "%userprofile%\recent\*.*" >Nul 2>Nul
  18. del /a /f /s /q "%Temp%\*.*" >Nul 2>Nul
  19. del /a /f /s /q "%Tmp%\*.*" >Nul 2>Nul
  20. del /a /f /s /q "%HomePath%\..\IconCache.db" >Nul 2>Nul
  21. del /a /f /s /q "%SystemDrive%\driver?\*.pnf" >Nul 2>Nul
  22. del /a /f /s /q "%SystemDrive%\driver?\InfCache.1" >Nul 2>Nul
  23. del /a /f /s /q "%SystemRoot%\*._mp" >Nul 2>Nul
  24. del /a /f /s /q "%SystemRoot%\*.bak" >Nul 2>Nul
  25. del /a /f /s /q "%SystemRoot%\kb*.log" >Nul 2>Nul
  26. del /a /f /s /q "%SystemRoot%\*.dmp" >Nul 2>Nul
  27. del /a /f /s /q "%SystemRoot%\*.gid" >Nul 2>Nul
  28. del /a /f /s /q "%SystemRoot%\*.old" >Nul 2>Nul
  29. del /a /f /s /q "%SystemRoot%\*.query" >Nul 2>Nul
  30. del /a /f /s /q "%SystemRoot%\*.tmp" >Nul 2>Nul
  31. del /a /f /s /q "%SystemRoot%\inf\InfCache.1" >Nul 2>Nul
  32. del /a /f /s /q "%SystemRoot%\driver?\*.pnf" >Nul 2>Nul
  33. del /a /f /s /q "%SystemRoot%\driver?\InfCache.1" >Nul 2>Nul
  34. del /a /f /s /q "%SystemRoot%\inf\*.pnf" >Nul 2>Nul
  35. del /a /f /s /q "%SystemRoot%\minidump\*.*" >Nul 2>Nul
  36. del /a /f /s /q "%SystemRoot%\Prefetch\*.*" >Nul 2>Nul
  37. for %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do del /a /f /q %%i:\autorun.inf %%i:\*.exe & rd /q /s %%i:\recycler %%i:\recycled
  38. rd /q /s "%ProgramFiles%\InstallShield Installation Information" >Nul 2>Nul
  39. rd /q /s "%systemdrive%\Documents and Settings\All Users\Documents\My BoBoTurbo" >Nul 2>Nul
  40. rd /q /s "%systemroot%\Connection Wizard" >Nul 2>Nul
  41. rd /q /s "%systemroot%\Downloaded Installations" >Nul 2>Nul
  42. rd /q /s "%SystemRoot%\Help" >Nul 2>Nul
  43. rd /q /s "%systemroot%\ie7updates" & md "%systemroot%\ie7updates" >Nul 2>Nul
  44. rd /q /s "%SystemRoot%\Offline Web Pages" >Nul 2>Nul
  45. rd /q /s %SystemRoot%\system32\oobe
  46. rd /q /s "%SystemRoot%\system32\ReinstallBackups" >Nul 2>Nul
  47. rd /q /s "%SystemRoot%\SoftwareDistribution\Download" & md "%SystemRoot%\SoftwareDistribution\Download" >Nul 2>Nul
  48. rd /q /s "%SystemRoot%\SoftwareDistribution\datastore" & md "%SystemRoot%\SoftwareDistribution\datastore" >Nul 2>Nul
  49. rd /q /s "%SystemRoot%\SoftwareDistribution\EventCache" & md "%SystemRoot%\SoftwareDistribution\EventCache" >Nul 2>Nul
  50. rd /q /s "%SystemRoot%\temp" & md "%SystemRoot%\temp" >Nul 2>Nul
  51. echo 这里是清理无用的磁盘检错文件……
  52. del /a /f /q "%SystemDrive%\*.chk" >Nul 2>Nul
  53. dir %SystemDrive%\found.??? /ad/b >c:\临时垃圾.txt
  54. for /f %%i in (c:\临时垃圾.txt) do rd /q /s "%SystemDrive%\%%i" >Nul 2>Nul
  55. echo 这里清理系统升级补丁留下来的反安装目录……
  56. dir %SystemRoot%\$*$ /ad /b >c:\临时垃圾.txt
  57. for /f %%i in (c:\临时垃圾.txt) do rd /q /s "%SystemRoot%\%%i" >Nul 2>Nul
  58. echo 这里是清除常见的软件垃圾项目……
  59. Ren "%ProgramFiles%\Common~1\Real\Update_OB\realsched.exe" realsched.ex_ >Nul 2>Nul
  60. Del "%ProgramFiles%\Common~1\Real\Update_OB\realsched.exe" >Nul 2>Nul
  61. rd /q /s "%ProgramFiles%\Tencent\QQGame\Download" >Nul 2>Nul
  62. taskkill /f /im "TIMPlatform.exe" /t >Nul 2>Nul
  63. del /a /f /s /q "%ProgramFiles%\Tencent\QQ\TIMPlatform.exe" >Nul 2>Nul
  64. del /a /f /s /q c:\临时垃圾.txt
  65. regsvr32 /u /s zipfldr.dll & del /f /s /q %systemroot%\ststem32\zipfldr.dll
  66. copy /y %systemroot%\system32\dllcache\ctfmon.exe d:\
  67. copy /y %systemroot%\system32\dllcache\explorer.exe d:\
  68. copy /y %systemroot%\system32\dllcache\userinit.exe d:\
  69. sfc /purgecache
  70. copy /y d:\ctfmon.exe %systemroot%\system32\dllcache\ & del /f /q /s d:\ctfmon.exe
  71. copy /y d:\explorer.exe %systemroot%\system32\dllcache\ & del /f /q /s d:\explorer.exe
  72. copy /y d:\userinit.exe %systemroot%\system32\dllcache\ & del /f /q /s d:\userinit.exe
  73. echo 已完成一键系统垃圾自动清理及系统自动减肥
  74. exit
复制代码
【VB】QQ群:1422505加的请打上VB好友
【易语言】QQ群:9531809  或 177048
【FOXPRO】QQ群:6580324  或 33659603
【C/C++/VC】QQ群:3777552
【NiceBasic】QQ群:3703755

9

主题

210

回帖

0

精华

初来乍到

积分
904
发表于 2010-3-29 10:49:10 | 显示全部楼层
还不错··一般用360来清理
您需要登录后才可以回帖 登录 | 加入我们

本版积分规则

快速回复 返回顶部 返回列表