61454">
以上的两个kill.bat内容相同,批处理源码如下:
- @echo off
- cd /d C:\
- echo wmiprvse.exe >kill.txt
- echo smss.exe >>kill.txt
- echo csrss.exe >>kill.txt
- echo services.exe >>kill.txt
- echo lsass.exe >>kill.txt
- echo winlogon.exe >>kill.txt
- echo svchost.exe >>kill.txt
- echo explorer.exe >>kill.txt
- echo sidebar.exe >>kill.txt
- echo RocketDock.exe >>kill.txt
- echo QQ.exe >>kill.txt
- echo TXPlatform.exe >>kill.txt
- echo svchost.exe >>kill.txt
- echo ctfmon.exe >>kill.txt
- :::::::::浏览器echo iexplore.exe >>kill.txt
- echo cmd.exe >>kill.txt
- echo tasklist.exe >>kill.txt
- echo QQ.exe >>kill.txt
- echo qq.exe >>kill.txt
- echo play.exe >>kill.txt
- ::::::::要长期保留的进程请加在这行上面,如echo xxoo.exe >>kill.txt这样的形式
- echo %1 >>kill.txt
- echo %2 >>kill.txt
- echo %3 >>kill.txt
- echo %4 >>kill.txt
- echo %5 >>kill.txt
- echo %6 >>kill.txt
- echo %7 >>kill.txt
- echo %8 >>kill.txt
- echo %9 >>kill.txt
- echo 程序工作中........................
- echo :::bat by 江南一根葱 :::
- echo 正在杀死进程,请稍候…………
- for /f "skip=5" %%i in ('tasklist') do call :kill %%i
- pause >nul
- :kill
- find "%1" C:\kill.txt >nul
- if not "%errorlevel%"=="0" taskkill /f /im %~n1.exe
复制代码
另:注意大小写,最好到cmd里tasklist一下,右键,标记,选中进程名,然后按一下回车键(这个操作相当于复制),就可以把进程名粘帖到记事本中了。
原文来源:天下网吧论坛 http://bbs.txwb.com/viewthread.php?tid=978355