中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-07 15:19
48,041 topics / 350,128 posts / today 3 new / 48,252 members
DOS批处理 & 脚本技术(批处理室) » How to use batch processing to detect whether a process exists?
Printable Version  2,257 / 2
Floor1 zuimeng Posted 2008-02-29 09:14
初级用户 Posts 83 Credits 170
rt

It is to detect whether a specific known process exists in the current system operation.

Thank you!



After executing the find sentence, it always prompts "There should not be 1 at this time."

[ Last edited by zuimeng on 2008-2-29 at 09:59 AM ]
Floor2 不得不爱 Posted 2008-02-29 11:40
超级版主 Posts 2,044 Credits 5,310 From 四川南充
tasklist /nh>d:\tddown~1\1.txt
find /i "QQ.exe" d:\tddown~1\1.txt
if ERRORLEVEL 1 (echo qq.exe does not exist>>d:\tddown~1\1.txt) else (echo qq.exe exists>>d:\tddown~1\1.txt)
Floor3 zuimeng Posted 2008-02-29 13:10
初级用户 Posts 83 Credits 170
Thanks
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023