How to kill a process from command line in Windows 7


This article explains How to kill a process in Windows 7 from the command line which is easier to kill a process rather than using task manager

To kill a process in Windows 7 using Command prompt


Every one knows to kill a process in Windows using Task Manager Wizard.

Normally we are making use of ctrl+alt+del keys to show up the task manager wizard to kill the memory eating processor or "Not responding" process. Alternatively we can also make use of Windows command prompt to kill the process.

There are some more commands available like tasklist, tskill and taskkill and it can be used in command prompt.

TaskList


"Tasklist" utility displays a list of programs/processes which are running in a local or remote machine with information like how much memory and CPU time is used by a process. It will also shows the session name and Process ID (PID) of each process. Each process is assigned with an unique number.

By default tasklist will show the Image Name, PID, Session Name, Session, Mem Usage (Kilo Bytes).

Using tasklist you can connect to a remote system to check for the running process and to kill the remote machine process.

tasklist /S remotesystemname will show the list of process running in the remote machine.

tasklist /V will show additional details like Status, CPU Time, and Window Title.

tasklist –FI "STATUS eq unknown" will show all the process with unknown as status.

tasklist /svc will list the service hosted in each process.

For more options on tasklist command check the help using tasklist /?

Tskill


"Tskill" to kill the process based on the process name or processid which is running in a local machine or in a remote machine.

tskill notepad will kill all notepad opened in the system.

tskill 1783 will terminate the application which is running with process id 1783

tskill /SERVER:mytestserver notepad /A will terminate the notepad which is running on the server which is running in ALL sessions.

For more advanced options on tskill command check the help using tskill /?


Taskkill


"Taskkill" will terminate a process similar like tskill, but we can use Image Name or PID with filter option in a local machine or in a remote machine.

taskkill /IM notepad.exe will terminate the notepad.exe

taskkill /PID 2324 /PID 23444 /PID 3444 /T will terminate multiple PID and also its child processes which were started by the parent process.

taskkill /PID 2344 /F will forcefully terminate the process with process id 2344.

For more options on taskkill command check the help using taskkill /?


Related Articles

Windows 7 parental control feature: A review

This article explains the Parent control feature of Windows 7 which allows to the login access to the computer for certain hours per day, blocking specific games or program for a specific user

Windows 7 Firewall features

This article explains Windows 7 firewall's new and enhanced features which gives more control on Firewall and includes multiple profiles for each connection type.

How to install Windows 7 Professional operating system in your home desktop or laptop

Are you looking for installation guide of Windows 7 Professional operating system. Windows 7 is an operating system created by Microsoft to be installed on computers and laptops. In this article, I have given detailed steps about how to install Windows 7 in your home PC. Read this article to know the details about installation guide of Windows 7 Professional operating system.

More articles: Windows in windows 7 Windows 7 Command Prompt Command prompt

Comments

Guest Author: detroy03 Dec 2013

C:\Windows\system32>taskkill /IM K7AVScan.exe /f
ERROR: The process "K7AVScan.exe" with PID 6528 could not be terminated.
Reason: Access is denied.

What is the solution?



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: