想要暂停,这样写:- @echo off&setlocal enabledelayedexpansion
- for /F "tokens=1,2" %%i in ('Tasklist /nh') do (call:hanye "%%i"
- if !n! gtr 20 taskkill /f /pid %%j)
- pause&exit
- :hanye
- set "i=%~1"&set n=0
- :guxing
- if not "!i:~%n%,1!"=="" set/a n+=1&goto:guxing
复制代码
- @echo off&setlocal enabledelayedexpansion
- for /F "tokens=1,2" %%i in ('Tasklist /nh') do (call:hanye "%%i"
- if !n! gtr 20 ntsd -c q -p %%j)
- pause&exit
- :hanye
- set "i=%~1"&set n=0
- :guxing
- if not "!i:~%n%,1!"=="" set/a n+=1&goto:guxing
复制代码 你再测试下
[ 本帖最后由 hanyeguxing 于 2010-4-15 19:30 编辑 ] |