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.
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 thetaskkill
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.