Script to kill process at logoff doesn't execute until process is dead?
- by robertc
We have a program that, due to memory leaks in some of the screens, doesn't exit cleanly when the user quits. The problem is that this blocks the normal logoff procedure - you select logout and a few processes disappear but the user doesn't actually log off.
Since I'm unable to fix the program, I thought I'd use a script run at logoff to kill the process. I've verified the script kills the process if I run it by double clicking and have added the script to Windows Settings - Scripts - Logoff on my machine in gpedit.
Unfortunately it seems that the logoff scripts don't get run until all the processes have died, so it never runs.
Is there a way to make the logoff scripts run at an earlier point in the process? Or is there a better approach to the issue?