Script to kill process at logoff doesn't execute until process is dead?
Have you tried the registry setting under HKEY_CURRENT_USER\Control Panel\Desktop AutoEndTasks set to 1? If that works you will not need the script.
You could use a program to log off such as http://www.karenware.com/powertools/ptstopper.asp that runs scripts before the log off.
add this to the end of your script
Set strComputer = "."
Set OpSysSet = GetObject("winmgmts:{(Shutdown)}//" & strComputer & "/root/cimv2").ExecQuery("select * from Win32_OperatingSystem where Primary=true")
for each OpSys in OpSysSet
OpSys.Win32Shutdown 0
next
WScript.Quit(0)
have them use this script instead of the normal logoff.
i am currently not sure how to make it run a script before processes quit, but can continue to look if this doesnt work. also, i didnt get a chance to test, but that should be the right syntax for the command. let me know if it needs some tweaks.