China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-14 23:27
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to end all processes except the specified ones? View 1,526 Replies 8
Original Poster Posted 2007-06-02 00:01 ·  中国 河南 新乡 联通
初级用户
Credits 88
Posts 40
Joined 2006-12-26 07:32
19-year member
UID 74591
Gender Male
Status Offline
How to end all processes except the specified one
Floor 2 Posted 2007-06-02 00:21 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
19-year member
UID 59080
Status Offline
Floor 3 Posted 2007-06-02 00:27 ·  中国 河南 新乡 联通
初级用户
Credits 88
Posts 40
Joined 2006-12-26 07:32
19-year member
UID 74591
Gender Male
Status Offline
Originally posted by lxmxn at 2007-6-2 12:21 AM:
Please search by yourself before asking questions.

http://www.cn-dos.net/forum/viewthread.php?tid=29777

http://www.cn-dos.net/forum/viewthread.php?tid=27155

http://www.cn-d ... Thank you, moderator. I'm troubled to ask what the search keywords are... I searched for "end process" but none of these three were found :(
Floor 4 Posted 2007-06-02 00:31 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
19-year member
UID 59080
Status Offline
When searching, you should select "Search post content" under the "Search range", and then search with the keyword "process".
Floor 5 Posted 2007-06-02 02:30 ·  中国 广西 柳州 鱼峰区 电信
初级用户
Credits 42
Posts 19
Joined 2007-05-31 07:49
19-year member
UID 89827
Gender Male
Status Offline
Hehe, this is simple, watch my code

Check if the Wanxiang process exists. If it does, loop every minute; otherwise, send a Feige Messenger to the host that Wanxiang has been cracked
:a
ping 127.1 -n 60 >nul 2>nul
tasklist|findstr /i "WX.exe" ||net send 192.168.1.254 Warning: Wanxiang has been illegally cracked, please ask the cashier MM to contact the network administrator immediately, bring the tools, hurry up, NND!!!
tasklist|findstr /i "WX.exe" ||net send 192.168.1.254 Warning: Wanxiang has been illegally cracked, please ask the cashier MM to contact the network administrator immediately, bring the tools, hurry up, NND!!!
goto :a

[ Last edited by chenjide1314521 on 2007-6-2 at 02:31 AM ]
Floor 6 Posted 2007-06-02 02:32 ·  中国 广西 柳州 鱼峰区 电信
初级用户
Credits 42
Posts 19
Joined 2007-05-31 07:49
19-year member
UID 89827
Gender Male
Status Offline
Originally posted by juventusryp at 2007-6-2 12:01 AM:
How to end all processes except the specified one?


......I'm off the point......
Floor 7 Posted 2007-06-02 02:39 ·  中国 广西 柳州 鱼峰区 电信
初级用户
Credits 42
Posts 19
Joined 2007-05-31 07:49
19-year member
UID 89827
Gender Male
Status Offline
Are you going to prohibit illegal processes?

How many illegal processes are to be prohibited?

If there are thousands of processes to be prohibited, scanning once will take a very long time, and your machine will definitely crash.

You should at least say what your use is, that's all.
Floor 8 Posted 2007-06-02 12:04 ·  中国 广东 清远 联通
高级用户
★★
Credits 846
Posts 247
Joined 2006-10-27 12:03
19-year member
UID 68504
Gender Male
From 湖南==》广东
Status Offline
Through the method of findstr, the efficiency may be relatively poor. Just as the friend upstairs is going to say, if there are many processes, it will take a long time. I think defining the process first and then using if defined to check should greatly improve the efficiency.
Floor 9 Posted 2007-06-02 18:46 ·  中国 广西 柳州 电信
初级用户
Credits 42
Posts 19
Joined 2007-05-31 07:49
19-year member
UID 89827
Gender Male
Status Offline
Originally posted by youxi01 at 2007-6-2 12:04 PM:
The method through findstr may be relatively less efficient. Just as the friend upstairs is going to say, if there are many processes, it will take a long time. I think defining the process first and then using if defined to check should greatly improve efficiency.



I don't know much about DOS

If defined finds the matching character and kills it if there is any

It's simply like this

For something more professional, I think using a program is better

Traversing tens of thousands of virus process libraries, with a P3 CPU 900, such a machine has 100% CPU usage for about 10 seconds

If the machine is better, the speed will be faster

If the landlord wants it, add my Q 372030668
Forum Jump: