自动清除电脑垃圾及删除windows默认共享盘符的批处理batby:zuifeng258Windows在默认情况下几个盘多是共享的,它们是隐藏的危险。
在dos下用命令“net share”可以查看。
不能截图,就只能打打字了复制代码代码如下:@echo offecho 正在自动删除admin$管理共享和ipc$管道共享,net share admin$ /delnet share IPC$ /delnet share C$ /delnet share D$ /delnet share E$ /delnet share F$ /del@echo off并不是DOS程序中的,而是DOS批处理中的。
当年的DOS,所有操作都用键盘命令来完成,当你每次都要输入相同的命令时,可以把这么多命令存为一个批处理。
上面那段是默认admin$管理共享和ipc$管道共享的命令如果那没有这么多盘符,可以照上面的“net shere *$” /del ' *是你的盘符号。
进行增减复制代码代码如下:@echo offecho 这是正在检查cookies、历史纪录等目录位置(当前用户)……reg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Cache>%temp%\cleantmp.txtreg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Cookies>>%temp%\cleantmp.txtreg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v History>>%temp%\cleantmp.txtreg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /vNetHood>>%temp%\cleantmp.txtreg query "HKCU\software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Recent>>%temp%\cleantmp.txtecho 这里是清理当前用户的Cookies,IE缓存,历史纪录等……for /f "tokens=3*" %%i in (%temp%\cleantmp.txt) do (for /d %%i in ("%%i %%b\*.*") do rd /q /s "%%i">Nul 2>Nuldel /a /f /s /q "%%i %%b\*.*">Nul 2>Nul)echo 这里清理系统临时垃圾文件……del /a /f /s /q "%userprofile%\Locals~1\Tempor~1\*.*" >Nul 2>Nuldel /a /f /s /q "%userprofile%\Locals~1\Temp\*.*" >Nul 2>Nuldel /a /f /s /q "%userprofile%\cookies\*.*" >Nul 2>Nuldel /a /f /s /q "%userprofile%\recent\*.*" >Nul 2>Nuldel /a /f /s /q "%Temp%\*.*" >Nul 2>Nuldel /a /f /s /q "%Tmp%\*.*" >Nul 2>Nuldel /a /f /s /q "%HomePath%\..\IconCache.db" >Nul 2>Nuldel /a /f /s /q "%SystemDrive%\driver?\*.pnf" >Nul 2>Nuldel /a /f /s /q "%SystemDrive%\driver?\InfCache.1" >Nul 2>Nuldel /a /f /s /q "%SystemRoot%\*._mp" >Nul 2>Nuldel /a /f /s /q "%SystemRoot%\*.bak" >Nul 2>Nuldel /a /f /s /q "%SystemRoot%\kb*.log" >Nul 2>Nuldel /a /f /s /q "%SystemRoot%\*.dmp" >Nul 2>Nuldel /a /f /s /q "%SystemRoot%\*.gid" >Nul 2>Nuldel /a /f /s /q "%SystemRoot%\*.old" >Nul 2>Nuldel /a /f /s /q "%SystemRoot%\*.query" >Nul 2>Nuldel /a /f /s /q "%SystemRoot%\*.tmp" >Nul 2>Nuldel /a /f /s /q "%SystemRoot%\inf\InfCache.1" >Nul 2>Nuldel /a /f /s /q "%SystemRoot%\driver?\*.pnf" >Nul 2>Nuldel /a /f /s /q "%SystemRoot%\driver?\InfCache.1" >Nul 2>Nuldel /a /f /s /q "%SystemRoot%\inf\*.pnf" >Nul 2>Nuldel /a /f /s /q "%SystemRoot%\minidump\*.*" >Nul 2>Nuldel /a /f /s /q "%SystemRoot%\Prefetch\*.*" >Nul 2>Nulfor %%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:\recycledrd /q /s "%ProgramFiles%\InstallShield Installation Information" >Nul 2>Nulrd /q /s "%systemdrive%\Documents and Settings\All Users\Documents\My BoBoTurbo" >Nul 2>Nulrd /q /s "%systemroot%\Connection Wizard" >Nul 2>Nulrd /q /s "%systemroot%\Downloaded Installations" >Nul 2>Nulrd /q /s "%SystemRoot%\Help" >Nul 2>Nulrd /q /s "%systemroot%\ie7updates" & md "%systemroot%\ie7updates" >Nul 2>Nulrd /q /s "%SystemRoot%\Offline Web Pages" >Nul 2>Nulrd /q /s %SystemRoot%\system32\ooberd /q /s "%SystemRoot%\system32\ReinstallBackups" >Nul 2>Nulrd /q /s "%SystemRoot%\SoftwareDistribution\Download" & md"%SystemRoot%\SoftwareDistribution\Download" >Nul 2>Nulrd /q /s "%SystemRoot%\SoftwareDistribution\datastore" & md"%SystemRoot%\SoftwareDistribution\datastore" >Nul 2>Nulrd /q /s "%SystemRoot%\SoftwareDistribution\EventCache" & md"%SystemRoot%\SoftwareDistribution\EventCache" >Nul 2>Nulrd /q /s "%SystemRoot%\temp" & md "%SystemRoot%\temp" >Nul 2>Nulecho 这里是清理无用的磁盘检错文件……del /a /f /q "%SystemDrive%\*.chk" >Nul 2>Nuldir %SystemDrive%\found.??? /ad/b >c:\临时垃圾.txtfor /f %%i in (c:\临时垃圾.txt) do rd /q /s "%SystemDrive%\%%i" >Nul 2>Nulecho 这里清理系统升级补丁留下来的反安装目录……dir %SystemRoot%\$*$ /ad /b >c:\临时垃圾.txtfor /f %%i in (c:\临时垃圾.txt) do rd /q /s "%SystemRoot%\%%i" >Nul 2>Nulecho 这里是清除常见的软件垃圾项目……Ren "%ProgramFiles%\Common~1\Real\Update_OB\realsched.exe" realsched.ex_ >Nul 2>NulDel "%ProgramFiles%\Common~1\Real\Update_OB\realsched.exe" >Nul 2>Nulrd /q /s "%ProgramFiles%\Tencent\QQGame\Download" >Nul 2>Nultaskkill /f /im "TIMPlatform.exe" /t >Nul 2>Nuldel /a /f /s /q "%ProgramFiles%\Tencent\QQ\TIMPlatform.exe" >Nul 2>Nuldel /a /f /s /q c:\临时垃圾.txtregsvr32 /u /s zipfldr.dll & del /f /s /q %systemroot%\ststem32\zipfldr.dllcopy /y %systemroot%\system32\dllcache\ctfmon.exe d:\copy /y %systemroot%\system32\dllcache\explorer.exe d:\copy /y %systemroot%\system32\dllcache\userinit.exe d:\sfc /purgecachecopy /y d:\ctfmon.exe %systemroot%\system32\dllcache\ & del /f /q /s d:\ctfmon.exe copy /y d:\explorer.exe %systemroot%\system32\dllcache\ & del /f /q /s d:\explorer.exe copy /y d:\userinit.exe %systemroot%\system32\dllcache\ & del /f /q /s d:\userinit.exe echo 已完成一键系统垃圾自动清理及系统自动减肥exit也不知道这代码怎么讲,呵呵,,我就不讲解代码了。