Name

Taskkill — \windows\system32\taskkill.exe

Synopsis

Taskkill, included with Windows XP Professional only, is used to end one or more running processes from the command line. Task Manager, described previously, provides a more convenient interface for this function, but Taskkill can be used remotely. Taskkill takes the following command-line parameters:

taskkill [/s system [/u [domain\]username 
   [/p [password]]]] [/pid process_id | /im image] 
   [/f] [/t]

Option

Description

/s system

Specifies the remote system to which to connect.

/u [ domain \] username

Specifies the user context under which to execute.

/p [ password ]

Specifies the password for the specified user.

/f

Forcefully terminates the process.

/pid process_id

Specifies the process ID of the process to be terminated. To obtain the process IDs, use Tasklist (later in this chapter).

/im image

Specifies the image name of the process to be terminated; specify * to terminate all image names.

/t

Terminates the specified process and process tree, which includes any child processes that were started by it.

Get Windows XP Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.