Monday, 30 December 2013

Kill Never Ending Processes in Win 8, Win 7 and XP

Process in Windows are any executing program and keeps running in the background till you use that particular application. An application can have one or multiple processes. Every process, regardless the operating system you use, consume some memory and resources and highly proportional to computer operating speed.

Sometimes, these processes takes forever to end even after closing the relevant application. Those rouge processes keeps running in the background and can be seen by the Task Manager of your current operating system.  Task Manager comes with an ‘End Process’ button located at the bottom of the window which you can use to manually kill any particular process. Though, if you’re not lucky enough or your windows running into some sort of problems, this tool might not able to close that process and annoys you by appearing again and again.

There are tools and few manual tips which helps you in killing those faulty processes silently. All you need is a little command operating skills and short time we need to go through the whole steps. One such tool, provided from Microsoft itself entitled Taskkill. You can also found few similar tools to kill such processes such as PsKill, Stop-Process, kill etc.

Taskkill is used to kill processes by their process ID (PID) or image Name.

How to access Taskkill?
It can be easily accessed from the command prompt window. So before diving in, open command prompt by directly pressing ‘Win’ + ‘R’ button, type ‘cmd’ and hit enter.
                       

However, we’d recommend you to open elevated command prompt window, just to make sure that everything is authenticated and doesn’t interfere with application authentication issue. To open elevated command prompt window, go to Start > All Programs > System Tools > right click on Command Prompt and choose to run as administrator. If you’re using Windows 8 or higher, press ‘Win’ + ‘Q’ button and type cmd in the search text box as dictated in the image below:



Now, right click on the Command Prompt from search results screen and choose to ‘Run as Administrator’ from the bottom.

                 
How to use Taskkill to end one or multiple processes?
To get the whole command list and make this process little easier, type ‘taskkill /?’ which flashes a long list of commands, commonly used in killing rouge processes.

The fundamental syntax to kill any process will looks like:

Taskkill [Options] [PID]

For simplicity, we’re going to mention most helpful options for you to remember:


Parameter Description
/s(Computer) Where computer is the IP address of system located remotely. If you’re trying to kill processes at local computer, you won’t have to use this option.
/u(Domain)\(Username) Runs the command under user owning that particular PC. Again, you won’t have to use this option for local computer or can only be specified if /s is specified.
/p(password) Use to enter password for the username entered using /u command.
/fi(filter) Run command with filters. Where filter is used to select among set of tasks. It allows you to run multiple filters.
/pid (Process ID) Specifies the Process ID of the rouge process to be terminated.
/im(image names) Specify the image name of any particular process that you want to terminate. Again, use wildcard characters (*) to specify all image names.
/f Use to forcefully terminate processes. You don’t have to use this parameter while terminating applications on remote PC as all the remote process will be terminated forcefully by default.
/t Terminate the specified process and any child process started by it.

Kill process using application name
To kill the application and related process, simply type taskill /IM Application_Name. Where /IM option is the easiest way to close almost any application you want. For example, consider notepad is constantly running in the background and you want to close it immediately.

Simply type taskkill /IM notepad.exe and hit enter. Your CPU will immediately close all the open handles to notepad and allows resource allocation method to stop giving any more resources to that particular application or stop giving immediately.

Application_Name is used to specify the name of any particular application you want to close.
Kill process using Process ID

In case, you don’t remember the application name exactly but process ID instead, execute the command as mentioned below:

taskkill /pid 456

Where ‘456’ is the process ID of that particular process you want to terminate.

Kill all process owned by any specific user
what if you’re using machine that is also used by your colleagues or friends and they left some applications opened. Situations become worse when that particular application consuming loads of system resources and start giving you freezes or hangs. Well, in that case you got only one options left and that is to forcefully close all the running process using /f command. For example, see the detailed command line to be executed:

taskkill /f /FI ‘username’

Killing processes on a remote machine
This option comes very handy when something went wrong with your PC which prevents you to access your PC. In such case, just login into any remote PC and close that particular faulty application or process. P.S. You’ll need to know the exact application which causes this. For simplicity, I’m writing detailed command below to close application or process remotely:

taskkill /s IP_Address /u Domain/Username / IM Application_Name

Sometimes, killing application becomes a daunting task for you and annoys you. In worst situation, such processes will continue to exist even after forcefully terminating it from the Task Manager.  However, tools like TaskKIll can save you from all these troubles and allows you to force quit applications without rebooting your computer which may ultimately saves lot of time and prevents you to losing your valuable data due to force reboot.