Topic : How to force a program to close using command prompt ?



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:


How to force a program to close using command prompt Step No 1 : InfoBrother

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:


How to force a program to close using command prompt Step No 2 : InfoBrother

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.


How to force a program to close using command prompt Step No 3 : InfoBrother

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:


How to force a program to close using command prompt Step No 4 : InfoBrother

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.



You like it? Other May like it too:

PLEASE SHARE









I Tried my Best to Provide you complete Information regarding this topic in very easy and conceptual way. but still if you have any Problem to understand this topic, or do you have any Questions, Feel Free to Ask Question. i'll do my best to Provide you what you need.

Sardar Omar.
InfoBrother




WRITE FOR INFOBROTHER

Advertising






Advertisement