4

How can I kill a process from the command prompt on Windows NT? Preferably with a tool that comes with the operating system.

1

4 Answers 4

11

If you had XP or later you could use TASKKILL. This on not NT though.

I think you're going to have to download something to do this. I'd recommend pskill from Sysinternals.

You can use this either with a process ID or just with a process name. For example:

pskill notepad.exe

Another option is KILL from the NT Resource Kit.

1
  • 1
    "This on not NT though." -- Windows XP is NT series, and has taskkill. So I guess you meant "NT 4.0 or older", or something like that.
    – user1686
    Oct 1, 2009 at 13:07
1

To kill process with children (like apache), from Windows XP to Windows Seven :

TASKKILL /T /F /PID 4520
0

We can use VBScript and WMI to kill processes:

Dim strComputer,objWMIService,objProcessList,objProcess
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objProcessList = objWMIService.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'THE PROCESS NAME'")
For Each objProcess in objProcessList
  objProcess.Terminate()
Next

Or in modern windows editions, we can use Powershell:

Stop-Process -Name "PROCESS NAME WITHOUT EXTENSION"
-2

There are a couple of choices:

KILL Command

kill process name or id

or

kill -f process name or id

AT Utility

at time /interactive cmd /c kill -f process name or id

And of course

Reboot :-)

1
  • 2
    The AT utility doesn't kill the command. The command line is still using KILL. The advantage of calling it using AT as the KILL runs as LocalSystem instead of the current user which means it my kill some more processes which are less inclined to die.
    – David Webb
    Oct 1, 2009 at 8:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.