Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
KEYWORDS: kill terminate close wbt script permit allow
To be more specific, I've put together something that runs a browser (right now via just a plain Run(browserpath, startURL)) and then puts up a timer dialog that counts down a number of seconds and kills the browser once time runs out (via tkillproc from the proc extender) - so the user can only run the browser for a few minutes at a shot. However, the problem is that a smart user can right now find the timer program in Task Manager and kill it, thus allowing the browser to stay alive indefinetly. Any way to have it so that if my process is killed any "child" processes it launched will die as well?? Interestingly enough, right now if the user just "Closes" my timer (with an Alt+F4, for example) the browser does go down as when the timer runs out.
As for killing child processes, as long as you know the PID [Process ID] of the process that started the browser, then it is possible to interrogate each process on the system [requires admin privileges] to see if each one is descended from the specified parent process. When you find a match, kill the process and store its PID in a list and then interrogate processes on the system again in case the browser spawned off child browsers. Do this until nothing is left in the process tree. If you're doing this in a Terminal Services / Citrix environment, then the WTS extender can be of some assistance as it can list processe that are running within a specific session, and you might want to simply kill all instances of IE that are running in any particular session to make sure that the session [even if there is only 1 session] is no longer running any instances of IE.
Article ID: W16496
File Created: 2005:02:18:12:21:00
Last Updated: 2005:02:18:12:21:00