|
koala
初级用户
Batchs上議院參議長
积分 199
发帖 105
注册 2007-6-5 来自 江苏
状态 离线
|
『楼 主』:
谁能为我代码简化一下
:loop
:: 此段是本人学习 c 语法中 if嵌套式复合语句后添加的,增强了脚本的智能性
cls
echo process正在关闭非系统必要进程,请稍候...
"%process%" > "%temp%\processlist.txt"
type "%temp%"\processlist.txt|"%find%" /i "explorer.exe" >NUl
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "notepad.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "regedit.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "conime.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "internat.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "ctfmon.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "mspaint.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "WinRAR.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "mstask.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "mstask" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "ddhelp.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "kernel32.dll" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "kernel32" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "mmc" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "alg.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "regsvc.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "inetinfo.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "snmp.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "mdm.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "msgsrv.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "spool32.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "spool32" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "spoolsv.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "stisvc.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "taskmgr.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "ttmplatform.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "myie.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "myie" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "realsched.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "wdfmgr.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "wuauserv.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "vb6.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "taskmon.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "iexplore.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "editplus.exe" >NUL
if errorlevel==1 (
type "%temp%"\processlist.txt|"%find%" /i "emeditor.exe" >NUL
if errorlevel==1 (
echo.
echo 进程终止完毕!
goto :continue
)
"%process%" -k emeditor.exe
goto :loop
)
"%process%" -k editplus.exe
goto :loop
)
"%process%" -k iexplore.exe
goto :loop
)
"%process%" -k taskmon.exe
goto :loop
)
"%process%" -k vb6.exe
goto :loop
)
"%process%" -k wuauserv.exe
goto :loop
)
"%process%" -k wdfmgr.exe
goto :loop
)
"%process%" -k realsched.exe
goto :loop
)
"%process%" -k myie
goto :loop
)
"%process%" -k myie.exe
goto :loop
)
"%process%" -k ttmplatform.exe
goto :loop
)
"%process%" -k taskmgr.exe
goto :loop
)
"%process%" -k stisvc.exe
goto :loop
)
"%process%" -k spoolsv.exe
goto :loop
)
"%process%" -k spool32
goto :loop
)
"%process%" -k spool32.exe
goto :loop
)
"%process%" -k msgsrv.exe
goto :loop
)
"%process%" -k mdm.exe
goto :loop
)
"%process%" -k snmp.exe
goto :loop
)
"%process%" -k inetinfo.exe
goto :loop
)
"%process%" -k regsvc.exe
goto :loop
)
"%process%" -k alg.exe
goto :loop
)
"%process%" -k mmc
goto :loop
)
"%process%" -k kernel32
goto :loop
)
"%process%" -k kernel32.dll
goto :loop
)
"%process%" -k ddhelp.exe
goto :loop
)
"%process%" -k mstask
goto :loop
)
"%process%" -k mstask.exe
goto :loop
)
"%process%" -k WinRAR.exe
goto :loop
)
"%process%" -k mspaint.exe
goto :loop
)
"%process%" -k ctfmon.exe
goto :loop
)
"%process%" -k internat.exe
goto :loop
)
"%process%" -k conime.exe
goto :loop
)
"%process%" -k regedit.exe
goto :loop
)
"%process%" -k notepad.exe
goto :loop
)
"%process%" -k explorer.exe
goto :loop
:continue
if exist "%temp%\processlist.txt" del /q "%temp%\processlist.txt" >nul 2>nul
echo 下一步即将脚本控制中心 &pause:lol:
[ Last edited by koala on 2007-9-7 at 03:39 PM ]
|
『生如夏花之绚烂
死若秋叶之静美』 dos做到了 |
|
2007-9-7 15:38 |
|
|
wudixin96
银牌会员
积分 1928
发帖 931
注册 2007-1-6
状态 离线
|
|
2007-9-7 16:16 |
|
|
djmonkey1
初级用户
积分 26
发帖 13
注册 2007-8-12
状态 离线
|
|
2007-9-9 15:23 |
|
|
titiger
初级用户
积分 30
发帖 15
注册 2007-9-5
状态 离线
|
|
2007-9-15 19:48 |
|
|
lp1129
初级用户
积分 186
发帖 92
注册 2007-3-27
状态 离线
|
『第
5 楼』:
关闭非系统进程也用不着这么复杂啊
|
|
2007-9-17 20:36 |
|
|
lp1129
初级用户
积分 186
发帖 92
注册 2007-3-27
状态 离线
|
『第
6 楼』:
信不信,用一句批处理就能结束不在文本中的进程名
|
|
2007-9-18 10:51 |
|
|
hxwxyz
中级用户
积分 245
发帖 123
注册 2007-6-8
状态 离线
|
『第
7 楼』:
妈的 你也太强了吧 自卑中·····
|
|
2007-9-18 14:36 |
|
|
6622186
高级用户
积分 894
发帖 411
注册 2007-2-17
状态 离线
|
『第
8 楼』:
相信六楼, 不过楼主的精神可佳.
|
@set c= 不知则觉多,知则觉少,越知越多,便觉越来越少. --- 知多少.
@for,/l,%%i,in,(1,1,55)do,@call,set/p=%%c:~%%i,1%%<nul&ping/n 1 127.1>nul
|
|
2007-10-4 00:21 |
|
|
koala
初级用户
Batchs上議院參議長
积分 199
发帖 105
注册 2007-6-5 来自 江苏
状态 离线
|
『第
9 楼』:
现在明白了 可以用 佛如语句简化额
|
『生如夏花之绚烂
死若秋叶之静美』 dos做到了 |
|
2008-9-24 20:33 |
|