Script to kill process at logoff doesn't execute until process is dead?
Posted
by robertc
on Server Fault
See other posts from Server Fault
or by robertc
Published on 2010-01-18T11:46:20Z
Indexed on
2010/03/13
4:07 UTC
Read the original article
Hit count: 424
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?
© Server Fault or respective owner