How can I close a process that slows down my computer to a crawl?

0

I sometimes mess up and start a CPU-intensive program while I'm playing a videogame. Last time I did this, my game audio began looping in a really obnoxious fashion and the smallest mouse click took ages to complete. control-alt-delete took minutes to show the screen. I had to hard power down to fix it, using the power button.

Next time this happens, is there something I can do in Windows 10, maybe with some prep work, that could help me close down either the game or the program? I can't change anything about either program.

Nzall

Posted 2015-12-02T22:54:01.830

Reputation: 2 585

Hitting ALT+F4 would end the video game itself. This would immediately solve your CPU usage problem, although the process you ran, would indeed be able to use more of your CPU. In other words being, careful about what you run, is the best solution to a problem like this. If the process using the CPU had a window, ALT+F4, will close the windows explorer window of any process (in other words terminate the process) – Ramhound – 2015-12-02T23:16:49.453

Answers

1

If you want to detect and react to a specific something in Windows, the most efficient way is with Event viewer. Build an event that will catch this hangup and end the task.

Open Event Viewer (eventvwr.msc) and create a custom view.

For this event, it could range many levels since level lag varies. Let's check critical, error, and information. In this case, we're tracking the sources of the events themselves, not their logs. Hit the "By source" radio button. In the dropdown, select Application Error & Application Hang.

Just to be on the safe side (if the keywords/sources aren't effective for whatever reason), we'll enter three very common event IDs for crashing. Enter 1,1000,1002 in the ID text field. (If you'd like to look up more event IDs, you can find them here).

Our keywords are "Response Time" since we're concerned with our application responding. You can leave the User and Computer text fields as they are.

Custom View Configuration Capture

Hit OK. We now have an event that's aware of when a program crashes on our computer. Now all we have to do is make it do something when that happens. Still in event viewer, "Attach Task To This Custom View..." In the Wizard, go to Action. We want to run a command when this event occurs. Our command is taskkill, and the arguments going in the "Add arguments" field are /F /FI "STATUS eq NOT RESPONDING" /FI "WINDOWTITLE ne untitle*" You can now finish out of the Wizard.

[Regrettably, I don't have enough reputation to link all the things I was going to. It's my first day; sorry.]

Now when triggered, this view will shut down any processes that aren't responding. If you'd like to add more arguments for taskkill, they can be viewed in cmd with taskkill /?

Andrew West

Posted 2015-12-02T22:54:01.830

Reputation: 26