|
zdh
初级用户
 
积分 52
发帖 20
注册 2006-11-4
状态 离线
|
『楼 主』:
如何终止系统进程
使用 LLM 解释/回答一下
偶是新到菜鸟,想问两个问题:
1、使用BAT如何终止系统进程,能够在不知道进程名字时(例如只知道进程含有Q字母),可以批量处理吗?
2、偶写一个BAT,调用了某个EXE,但是如果不关闭这个EXE,BAT的黑框就会一直都有。可以调用EXE的同时关闭BAT窗口吗?
谢谢各位大虾!
I'm a new newbie, and I want to ask two questions:
1. How to use BAT to terminate system processes. Can it be batch processed when not knowing the process name (for example, only knowing that the process contains the letter Q)?
2. I wrote a BAT that calls a certain EXE, but if this EXE is not closed, the black box of the BAT will always be there. Can the BAT window be closed while calling the EXE?
Thank you, great gods!
|
|
2006-11-6 22:38 |
|
|
namejm
荣誉版主
       batch fan
积分 5226
发帖 1737
注册 2006-3-10 来自 成都
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
你这个帖子其实问了不相干的两个问题,建议拆分为两个帖子来发问,一来有利于日后的检索,二来方便版面管理,第三嘛,还可以赚点积分,呵呵。
1、你说你不知道进程的名字,按照一般的理解,你连自己想终止哪个进程都不清楚,那bat就更不可能知道你要干什么了。估计你是想终止某个程序,但是不知道这个程序对应着什么进程名是吧?
2、等你拆分完毕之后,再在新帖中回答。
You asked two irrelevant questions in this post. It is suggested to split them into two posts. First, it is conducive to future retrieval, second, it is convenient for layout management, third, it can also earn some points, he he.
1、You said you don't know the process name. According to the general understanding, you don't even know which process you want to terminate, so the bat is even more impossible to know what you want to do. It is estimated that you want to terminate a certain program, but you don't know what the process name corresponding to this program is, right?
2、Wait until you finish splitting, and then answer in the new post.
|

尺有所短,寸有所长,学好CMD没商量。
考虑问题复杂化,解决问题简洁化。 |
|
2006-11-7 01:47 |
|
|
zdh
初级用户
 
积分 52
发帖 20
注册 2006-11-4
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
遵命!马上分贴!
Yes, I'll split the post immediately!
|
|
2006-11-7 03:05 |
|
|
zdh
初级用户
 
积分 52
发帖 20
注册 2006-11-4
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
Originally posted by namejm at 2006-11-6 01:47 PM:
你这个帖子其实问了不相干的两个问题,建议拆分为两个帖子来发问,一来有利于日后的检索,二来方便版面管理,第三嘛,还可以赚点积分,呵 ...
我觉得你有点误解,我是说知道进程名包含某些共同的字母(如含有Q),能否批量关闭这些进程?
Originally posted by namejm at 2006-11-6 01:47 PM:
Your post actually asks two unrelated questions. It is recommended to split it into two posts for questioning. First, it is beneficial for future retrieval. Second, it is convenient for board management. Third, it can also earn some points. Hehe...
I think you have a bit of a misunderstanding. I mean, knowing that the process name contains certain common letters (such as containing Q), can these processes be closed in batches?
|
|
2006-11-7 03:10 |
|
|
youxi01
高级用户
   
积分 846
发帖 247
注册 2006-10-27 来自 湖南==》广东
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
对于XP系统,可以简单采用以下办法:
@for /f %%i in ('tasklist /NH ^|find /I "NOTE"') do @taskkill /IM %%i /T
说明:NOTE是你要结束的进程包含的文字。对于2000系统,请用WMI
For the XP system, you can simply use the following method:
@for /f %%i in ('tasklist /NH ^|find /I "NOTE"') do @taskkill /IM %%i /T
Description: NOTE is the text included in the process you want to end. For the 2000 system, use WMI
|
|
2006-11-7 05:14 |
|
|
qujymr
新手上路

积分 6
发帖 3
注册 2006-12-1
状态 离线
|
『第 6 楼』:
看看这个
使用 LLM 解释/回答一下
问:怎么才能关掉一个用任务管理器关不了的进程?
答1:
杀进程很容易,随便找个工具都行。比如IceSword。关键是找到这个进程的启动方式,不然下次重启它又出来了。顺便教大家一招狠的。其实用Windows自带的工具就能杀大部分进程:
c:\>ntsd -c q -p PID
只有System、SMSS.EXE和CSRSS.EXE不能杀。前两个是纯内核态的,最后那个是Win32子系统,ntsd本身需要它。ntsd从2000开始就是系统自带的用户态调试工具。被调试器附着(attach)的进程会随调试器一起退出,所以可以用来在命令行下终止进程。使用ntsd自动就获得了debug权限,从而能杀掉大部分的进程。ntsd会新开一个调试窗口,本来在纯命令行下无法控制,但如果只是简单的命令,比如退出(q),用-c参数从命令行传递就行了。NtsdNtsd 按照惯例也向软件开发人员提供。只有系统开发人员使用此命令。有关详细信息,请参阅 NTSD 中所附的帮助文件。用法:开个cmd.exe窗口,输入:
ntsd -c q -p PID
把最后那个PID,改成你要终止的进程的ID。如果你不知道进程的ID,任务管理器->进程选项卡->查看->选择列->勾上"PID(进程标识符)",然后就能看见了。
答2:
xp下还有两个好东东tasklist和tskill。tasklist能列出所有的进程,和相应的信息。tskill能查杀进程,语法很简单:tskill 程序名!!
Q: How to close a process that cannot be closed with the Task Manager?
A1:
Killing a process is very easy, any tool will do. For example, IceSword. The key is to find the startup method of this process, otherwise it will come out again after the next restart. By the way, teach you a tough trick. In fact, most processes can be killed with Windows built-in tools:
c:\>ntsd -c q -p PID
Only System, SMSS.EXE and CSRSS.EXE cannot be killed. The first two are purely kernel-mode, and the last one is the Win32 subsystem, and ntsd itself needs it. Ntsd has been a user-mode debugging tool built into the system since 2000. A process attached by a debugger will exit with the debugger, so it can be used to terminate the process from the command line. Ntsd automatically obtains debug permissions, so it can kill most processes. Ntsd will open a new debugging window. Originally, it cannot be controlled in the pure command line, but if it is just a simple command, such as exit (q), it can be passed from the command line with the -c parameter. Ntsd is also provided to software developers as usual. Only system developers use this command. For more information, see the help file attached in NTSD. Usage: Open a cmd.exe window and enter:
ntsd -c q -p PID
Change the last PID to the ID of the process you want to terminate. If you don't know the process ID, Task Manager -> Processes tab -> View -> Select Columns -> Check "PID (Process Identifier)", then you can see it.
A2:
Under XP, there are two more good things, tasklist and tskill. tasklist can list all processes and corresponding information. tskill can kill processes. The syntax is very simple: tskill program name!!
|
|
2006-12-1 08:30 |
|
|
vkill
金牌会员
     
积分 4103
发帖 1744
注册 2006-1-20 来自 甘肃.临泽
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
1 可是可以,那样肯定死机
2 start *.exe
1 It's possible, but it will definitely crash.
2 start *.exe
|
|
2006-12-1 08:34 |
|