how can I catch windows taskkill command in order to prevent it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You cannot prevent your process being killed. The only way to keep a program alive is to have a second Watchdog application that is constantly pooling that process to ensure it’s running.
So, you have two Applications; AppA (Main) and AppB (Watchdog).
But this is usually a design for a malicious process, so I hope you’re not doing anything untoward.
You can see the following events in the message queue when End process is clicked:
But if your application does not close in a timely manner, then the kill command will be sent, which cannot be captured.