Tuesday, August 2, 2011

Killing process with Taskkill in Windows

Taskkill is a windows command line utility through which you can kill the unwanted processes.


C:\>tasklist



Image Name                   PID Session Name     Session#    Mem Usage
========================= ====== ================ ======== ============
System Idle Process            0 Console                 0         28 K
System                         4 Console                 0        240 K
smss.exe                     384 Console                 0        416 K
csrss.exe                    660 Console                 0      1,344 K
winlogon.exe                 696 Console                 0      2,656 K
services.exe                 744 Console                 0      4,116 K
lsass.exe                    756 Console                 0      1,484 K
svchost.exe                  924 Console                 0      4,720 K
svchost.exe                  992 Console                 0      4,288 K
svchost.exe                 1080 Console                 0     31,068 K


Now, i want to kill process services.exe having PID 744. Type the below command to get this done.



C:\>taskkill /pid 744


SUCCESS: The process with PID 744 has been terminated.


Enjoy:-)