Trang chủ > Công nghệ thông tin, Thủ thuật > Microsoft DOS taskkill command

Microsoft DOS taskkill command

About taskkill

Allows a user running Microsoft Windows XP professional or Windows 2003 to kill a task from a MS-DOS prompt.

Tip: Windows XP home edition do not have access to this command. Use the command tskill instead.

Availability

The taskkill command is an external command that is available in the below Microsoft operating systems.

Windows XP Professional
Windows Vista
Windows 7

Syntax

taskkill [/s Computer] [/u Domain\User [/p Password]]] [/fi FilterName] [/pid ProcessID]|[/im ImageName] [/f][/t]

/s computer Specifies the name or IP address of a remote computer (do not use backslashes). The default is the local computer.
/u domain\user Runs the command with the account permissions of the user specified by User or Domain\User. The default is the permissions of the current logged on user on the computer issuing the command.
/p password Specifies the password of the user account that is specified in the /u parameter.
/fi FilterName Specifies the types of process(es) to include in or exclude from termination. The following are valid filter names, operators, and values.

Name Operators Value
Hostname eq, ne Any valid string.
Status eq, ne RUNNING|NOT RESPONDING
Imagename eq, ne Any valid string.
PID eq, ne, gt, lt, ge, le Any valid positive integer.
Session eq, ne, gt, lt, ge, le Any valid session number.
CPUTime eq, ne, gt, lt, ge, le Valid time in the format of hh:mm:ss. The mm and ss parameters should be between 0 and 59 and hh can be any valid unsigned numeric value.
Memusage eq, ne, gt, lt, ge, le Any valid integer.
Username eq, ne Any valid user name ([Domain\]User).
Services eq, ne Any valid string.
Windowtitle eq, ne Any valid string.
/pid processID Specifies the process ID of the process to be terminated.
/im ImageName Specifies the image name of the process to be terminated. Use the wildcard (*) to specify all image names.
/f Specifies that process(es) be forcefully terminated. This parameter is ignored for remote processes; all remote processes are forcefully terminated.
/t Specifies to terminate all child processes along with the parent process, commonly known as a tree kill.

Tip: See the operator definition for full information about operators and eq, ge, gt, le, lt, and ne.

Examples

Tip: If you need to see a listing of all running tasks use the tasklist command.

taskkill /f /im notepad.exe

Kills the open notepad task, if open.

taskill /pid 9764

Kill the task with PID 9764. If successful should give you a message similar to the below example.

SUCCESS: Sent termination signal to the process with PID 9764.

  1. Chưa có phản hồi.
  1. No trackbacks yet.

Gửi phản hồi

Mời bạn điền thông tin vào ô dưới đây hoặc kích vào một biểu tượng để đăng nhập:

WordPress.com Logo

Bạn đang bình luận bằng tài khoản WordPress.com Log Out / Thay đổi )

Twitter picture

Bạn đang bình luận bằng tài khoản Twitter Log Out / Thay đổi )

Facebook photo

Bạn đang bình luận bằng tài khoản Facebook Log Out / Thay đổi )

Google+ photo

Bạn đang bình luận bằng tài khoản Google+ Log Out / Thay đổi )

Connecting to %s

%d bloggers like this: