Saturday, January 10, 2009

Killing processes using the command prompt

To kill a process in the command prompt we need to know either its Image Name or Process ID. One way to find this is in the Windows Task Manager. The other way is to use the Tasklist command in the command prompt.

Command to kill a process in Windows XP Pro:

 taskkill [/pid processID | /im ImageName]} [/f] [/t]

/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 character (*) to specify all image names.

/f Specifies that processes be forcefully terminated.

/t Terminates the specified process and any child processes started by it.

Example: taskkill /im notepad.exe

Command to kill a process in Windows XP Home Edition: Windows XP Home Edition users can use the tskill command as follows: tskill {processID | processName}

Example: tskill notepad

No comments:

Post a Comment