packapotatoes / gameMode

Simple interface to stop and start multiple applications to free up resources for gaming.
0 stars 1 forks source link

Some programs don't play nice with `taskkill` and must be shut down forcefully with `/f` #3

Open packapotatoes opened 7 years ago

packapotatoes commented 7 years ago

Currently we are using taskkill /IM <process_name.exe> to send a shutdown signal to the running processes.

Some programs shut down gracefully with this method (chrome, among others). Some programs (Steam is the only one I have run into so far) only close the user interface but continue to run background processes. Adding /f to the taskkill command shuts Steam down completely. However, this is less desirable for applications that will close gracefully without being forced (chrome just reopens tabs upon restart when shutdown non-forced, but shows a "re-open tabs" dialogue when forced).

Maybe the solution is to attempt a non-forced shutdown, then check if the process is still running, and if so, force a shutdown.