Search code examples
c#eventsblockantivirus

Antivirus preblocking event


I writing C# app that kills other apps by specific criteria, but users can set in theirs antiviruses prohibition to my app to kill processes and my app cant do his work. How to do event in my app that fires every time when antivirus prohibite my app to kill process?

Thanks!


Solution

  • You cannot find out what really stopped your attempt to kill another process. But I can bet the function you use for killing returns an error code (or throws an exception) in case of mistake, so you can at least check whether your attempt was successful.