![]() |
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-29 08:54 |
47,816 topics / 349,916 posts / today 0 new / 48,265 members |
| DOS批处理 & 脚本技术(批处理室) » [Discussion] Turn off all processes except specified processes using TASKKILL |
| Printable Version 1,940 / 13 |
| Floor1 samual2004 | Posted 2007-01-27 14:20 |
| 初级用户 Posts 13 Credits 30 | |
|
I now want to handle the running situation of processes.
Now I want to handle it like this: The following is what I saved by tasklist >a.txt. I want to close all processes except those in a.txt. I don't know what good suggestions everyone has. System Idle Process 0 Console 0 16 K System 4 Console 0 164 K smss.exe 400 Console 0 336 K csrss.exe 580 Console 0 4,068 K winlogon.exe 712 Console 0 5,156 K services.exe 764 Console 0 4,448 K lsass.exe 776 Console 0 7,396 K svchost.exe 964 Console 0 3,700 K svchost.exe 1052 Console 0 4,484 K svchost.exe 1104 Console 0 5,904 K svchost.exe 1148 Console 0 13,984 K msdtc.exe 1204 Console 0 4,840 K svchost.exe 1368 Console 0 4,056 K svchost.exe 1404 Console 0 3,512 K svchost.exe 1544 Console 0 4,856 K jjsvr4.exe 1768 Console 0 7,636 K wmiprvse.exe 680 Console 0 5,584 K svchost.exe 616 Console 0 4,728 K conime.exe 1652 Console 0 3,324 K taskmgr.exe 552 Console 0 5,504 K TTPlayer.exe 196 Console 0 5,240 K TheWorld2010.exe 2080 Console 0 28,412 K Thunder5.exe 3228 Console 0 28,708 K explorer.exe 2184 Console 0 24,652 K wmiprvse.exe 3944 Console 0 5,540 K taskkill /im (+ processes not in a.txt) I don't know how to do it well.. Here I ask all friends for help. [ Last edited by namejm on 2007-1-27 at 07:43 PM ] |
|
| Floor2 electronixtar | Posted 2007-01-27 14:34 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
|
Clickbait~~~Sweat one. for+findstr
|
|
| Floor3 qasa | Posted 2007-01-27 14:37 |
| 高级用户 Posts 311 Credits 959 From 广东-LianJiang | |
|
Inadequate words, the panda is here to bite people
|
|
| Floor4 samual2004 | Posted 2007-01-27 14:50 |
| 初级用户 Posts 13 Credits 30 | |
|
If what I said is not clear,
please forgive me, everyone. I mean to close all processes that are not in this file. |
|
| Floor5 TLang | Posted 2007-01-27 23:04 |
| 初级用户 Posts 21 Credits 46 | |
|
As the second floor said~~
|
|
| Floor6 samual2004 | Posted 2007-01-27 23:38 |
| 初级用户 Posts 13 Credits 30 | |
|
Thanks for the suggestions from the person above.
After I finish writing that batch processing with 7 steps, I will post it here to share. |
|
| Floor7 youxi01 | Posted 2007-01-28 02:49 |
| 高级用户 Posts 247 Credits 846 From 湖南==》广东 | |
|
Once wrote a so-called "Process Analysis Batch". Here, to meet the building owner's requirements, just make a slight modification:
Instructions: 1. ProcessList.ini is the process list you defined 2. If it meets the requirements, change "echo" to "Taskkill". [ Last edited by youxi01 on 2007-1-28 at 02:51 AM ] |
|
| Floor8 samual2004 | Posted 2007-01-28 08:10 |
| 初级用户 Posts 13 Credits 30 | |
|
Thanks to the good stuff from the person above, I will improve my work as soon as possible and share it with everyone... My work is called "Make a Practical Anti-Virus XP/2003 System", divided into 7 steps, this is one of the steps. [ Last edited by samual2004 on 2007-1-28 at 10:45 AM ] |
|
| Floor9 eech | Posted 2007-01-30 23:11 |
| 高级用户 Posts 346 Credits 906 | |
Originally posted by samual2004 at 2007-1-28 08:10: Support. Strongly looking forward! |
|
| Floor10 talenyi | Posted 2007-01-31 05:20 |
| 新手上路 Posts 4 Credits 7 | |
| Floor11 hxwxyz | Posted 2007-09-18 15:16 |
| 中级用户 Posts 123 Credits 245 | |
| Floor12 HAT | Posted 2007-09-19 03:54 |
| 版主 Posts 5,017 Credits 9,023 | |
|
//Make a practical anti-virus XP/2003 system
Looking forward Mainly want to see how the landlord kills super stubborn processes |
|
| Floor13 dato | Posted 2007-12-04 12:32 |
| 高级用户 Posts 377 Credits 916 | |
|
Please provide the complete Chinese text that needs to be translated along with the code block again. The current information seems incomplete for a full translation. Please make sure the entire content to be translated is provided.
|
|
| Floor14 huahua0919 | Posted 2007-12-04 16:02 |
| 银牌会员 Posts 780 Credits 1,608 | |
|
There is a typo in the original Chinese text. The correct command should be "tokens" instead of "toekns". The translated content with correction is:
for /f "tokens=* delims=" %%i in ("ProcessList.ini") do set %%i=A |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |