Link to home
Create AccountLog in
Operating Systems

Operating Systems

--

Questions

--

Followers

Top Experts

Avatar of reidca
reidca🇬🇧

Killing NT Processes from command line
Does anyone know a way to kill an NT process using any command line utilities?

The obvious answer is to use kill.exe but the problem is that this requires the processes PID. The PID can change when the process is created.

Therefore does anyone know how to kill a process by specifying the executable name or process name ?

Thanks.

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of tonnybrandttonnybrandt


I think you are mistaken about kill.exe capabilities.
To be specific here is output of kill.exe /?

Microsoft (R) Windows NT (TM) Version 3.5 KILL
Copyright (C) 1994 Microsoft Corp. All rights reserved

usage: KILL [options] <<pid> | <pattern>>

           [options]:
               -f     Force process kill

           <pid>
              This is the process id for the task
               to be killed.  Use TLIST to get a
               valid pid

           <pattern>
              The pattern can be a complete task
              name or a regular expression pattern
              to use as a match.  Kill matches the
              supplied pattern against the task names
              and the window titles.

As you can see pattern can be a task name or window title.


Indead it's obvious: use kill.exe from the resource kit! Just type the process name instead of the process ID and the job is done. Want proof? Start the calculator, open a dos-box and type KILL CALC.EXE.

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Well... It can be that i have a different version of kill.exe. If so, I will be glad to email you mine.

P.S I tested mine and it does 'kill' processes by name.

mkoganov: to who is your last comment adressed? I think we made both the same comment: kill.exe is capable of doing the job. But it seems we posted the comment at roughly the same time, so i did not read your comment before posting mine (and neither did you read mine, I suppose)

Avatar of SunBowSunBow🇺🇸

For the $$$ NT costs, sure wish the RK stuff was easier to get at/to.

Do you know how well nt4's kill does on nt5? (Win2K)

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


ASKER CERTIFIED SOLUTION
Avatar of simonetsimonet🇧🇷

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of simonetsimonet🇧🇷

I mean that as a comment. Sorry.

Avatar of reidcareidca🇬🇧

ASKER

Thanks to everyone for their help with this.
SimonT -  have downloaded the killp you suggested and can confirm that it is exactly what I wanted.

The version of kill.exe that I had was NOT from the resource kit and could not kill processes by name.

Again, thanks again.

Nice!!!

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of simonetsimonet🇧🇷

Thanks!
Operating Systems

Operating Systems

--

Questions

--

Followers

Top Experts

Operating systems perform basic tasks, such as recognizing input from the keyboard, sending output to the display screen, keeping track of files and directories on the disk, and controlling peripheral devices such as disk drives and printers. For large systems, the operating system makes sure that different programs and users running at the same time do not interfere with each other. The operating system is also responsible for security, ensuring that unauthorized users do not access the system. Operating systems provide a software platform on top of which other programs, called application programs, can run.