2
I know that one can use Windows taskkill utility to "kill" a non-responsive process. But what happens if I call it on a process that is running and has no issues -- will taskkill try to quit it normally first?
PS. The reason I'm asking is because I want to use taskkill from a script to close one program, but I won't use it if it "forcefully" terminates the program's process without first letting it quit "gracefully."
1Thanks. How do you know that it
"sends a WM_CLOSE signal to the process"
? – MikeF – 2014-10-30T03:09:36.8271@MikeF I don't "know" it, I accept what others have found to be probably true. You can do the same, or you could find an app that watches the message pump, do a taskkill and see if WM_CLOSE appears in the queue. To indirectly confirm, open notepad, write stuff in it, then taskkill notepad. You should get a confirmation to close or save from notepad, which means it recieved a close signal rather than being terminated. Then do the same with
taskill /f
to see the difference. – Paul – 2014-10-30T03:18:25.220