How to force a program to close using command prompt?
Windows programs love to misbehave, when it comes time to put a program down, we turn to the Windows Task Manager to shut the program. sometimes we get lucky and windows tell us that the program isn't responding and give us some option to close the program or end it now or wait for the program to respond. But most of the times - all we get the message "Program not Responding" in the program's title bar and a full-screen gray out to make it clear that the program is not working. And we are trying to close the program by just tapping or clicking on that big X but it doesn't work.
In this situation, we have only option to force the program to Quit. To force Quit the program, we can use Task manager and some third-party tools. but the most simple and effective way to close the program is "Using Command Prompt - cmd". We are here to learn, how to close the program using command prompt - To learn this trick, follow the given steps, and enjoy your learning with InfoBrother.
»
QUICK SUMMARY:
1
Open CMD:
We can open command prompt or CMD using two ways:
1 » Click the window icon or press window key. search for cmd or command prompt and run it as Administration.
2 » Press Window key + R , A dialog box will open, type cmd in text area to open the command prompt. type cmd and press enter.
2
Get the List of all Active Application:
First of all we need to get the list of all Active Application. Type tasklist in command prompt and hit enter to get the list.
3
Understanding Image name & Process ID.
Using above command, we get the list of all active application. Now we need to find where is the application that we want to terminate. we can close the application using two way.
1 » Using The application Name known as "Image Name" - (im).
2 » Using the Application ID Known as "Process ID" - (pid).
4
Execute The Command to kill the task:
Finally we need to Execute the Command taskkill to terminate the program. We need to tell the task kill command that which program i need to close. we can do this using two ways.
1 » Using im:
taskkill /im filename.exe /f
2 » Using pid:
taskkill /pid process_ID /f
Above both method work same. The /f option force the program to Quit. we can use /t option to makes sure, the application child process are closed as well.