I am currently looking for a way to delete a certain file when a specific process has closed. I've found plenty of examples for creating a process and adding an event handler for exited
but I need to get notified of any processes in the system, not just those I create.
Can anyone shed light on how this could be accomplished?
I was very interested in your question so I wrote a little app for it, hopefully you find it useful. Can be improved in a lot of ways :)