Page 1 of 1
Kill command in windows
Posted: Wed Jul 27, 2005 11:16 pm
by Neo
Is there a CLI equivalent of the kill command for windows?
I googled for this and got
http://www.xmlsp.com/pview/prcview.htm which looks ok.
But I was wondering if therer were any Windows "tricks" to do this?
Re:Kill command in windows
Posted: Wed Jul 27, 2005 11:31 pm
by AR
Re:Kill command in windows
Posted: Wed Jul 27, 2005 11:54 pm
by Neo
Thanks a lot AR.
BTW I think the command is tskill. taskill did not work for me (I think it does for some other versions of windows though)
Re:Kill command in windows
Posted: Thu Jul 28, 2005 12:02 am
by AR
TASKKILL works on WindowsXP, don't know about other versions (Note that there are 2 Ks, not one)
Re:Kill command in windows
Posted: Thu Jul 28, 2005 1:52 am
by Neo
Oh! I was trying out "TASKILL" (missed a K there).
Yeah it does work but "TSKILL" looks like it has more options.
Re:Kill command in windows
Posted: Thu Jul 28, 2005 4:23 pm
by Tora OS
Neo wrote:
Oh! I was trying out "TASKILL" (missed a K there).
Yeah it does work but "TSKILL" looks like it has more options.
Code: Select all
C:\Documents and Settings\Administrator>TSKILL /?
Ends a process.
TSKILL processid | processname [/SERVER:servername] [/ID:sessionid | /A] [/
processid Process ID for the process to be terminated.
processname Process name to be terminated.
/SERVER:servername Server containing processID (default is current).
/ID or /A must be specified when using processname
and /SERVER
/ID:sessionid End process running under the specified session.
/A End process running under ALL sessions.
/V Display information about actions being performed.
[hr]
Code: Select all
C:\Documents and Settings\Administrator>TASKKILL /?
TASKKILL [/S system [/U username [/P [password]]]]
{ [/FI filter] [/PID processid | /IM imagename] } [/T] [/F]
Description:
This tool is used to terminate tasks by process id (PID) or image name
Parameter List:
/S system Specifies the remote system to connect to.
/U [domain\]user Specifies the user context under which the
command should execute.
/P [password] Specifies the password for the given user
context. Prompts for input if omitted.
/FI filter Applies a filter to select a set of tasks.
Allows "*" to be used. ex. imagename eq acme*
/PID processid Specifies the PID of the process to be terminat
Use TaskList to get the PID.
/IM imagename Specifies the image name of the process
to be terminated. Wildcard '*' can be used
to specify all tasks or image names.
/T Terminates the specified process and any
child processes which were started by it.
/F Specifies to forcefully terminate the process(e
/? Displays this help message.
Filters:
Filter Name Valid Operators Valid Value(s)
----------- --------------- -------------------------
STATUS eq, ne RUNNING |
NOT RESPONDING | UNKNOWN
IMAGENAME eq, ne Image name
PID eq, ne, gt, lt, ge, le PID value
SESSION eq, ne, gt, lt, ge, le Session number.
CPUTIME eq, ne, gt, lt, ge, le CPU time in the format
of hh:mm:ss.
hh - hours,
mm - minutes, ss - seconds
MEMUSAGE eq, ne, gt, lt, ge, le Memory usage in KB
USERNAME eq, ne User name in [domain\]user
format
MODULES eq, ne DLL name
SERVICES eq, ne Service name
WINDOWTITLE eq, ne Window title
NOTE
----
1) Wildcard '*' for /IM switch is accepted only when a filter is appli
2) Termination of remote processes will always be done forcefully (/F)
3) "WINDOWTITLE" and "STATUS" filters are not considered when a remote
machine is specified.
Examples:
TASKKILL /IM notepad.exe
TASKKILL /PID 1230 /PID 1241 /PID 1253 /T
TASKKILL /F /IM cmd.exe /T
TASKKILL /F /FI "PID ge 1000" /FI "WINDOWTITLE ne untitle*"
TASKKILL /F /FI "USERNAME eq NT AUTHORITY\SYSTEM" /IM notepad.exe
TASKKILL /S system /U domain\username /FI "USERNAME ne NT*" /IM *
TASKKILL /S system /U username /P password /FI "IMAGENAME eq note*"
It looks to me that TASKKILL has more options...
I've used Taskkill various times on TelNet to kill something on my server, or just to play with.
Re:Kill command in windows
Posted: Fri Jul 29, 2005 3:35 am
by Neo
yup your'e right.
Re:Kill command in windows
Posted: Tue Aug 09, 2005 10:55 am
by TheUnbeliever
Taskill - works on XP Home but you have to get it on there - it doesn't ship with it by default, tskill comes with XP Home and Professional.
Re:Kill command in windows
Posted: Tue Aug 09, 2005 6:01 pm
by mystran
Isn't there also the good old KILL.EXE in some utilities pack or something that you could download from microsoft.