|LateNightHacking Projects 2002||Auth|
2002-08-28 : I've been using the Win2K resource kit
kill.exe in the deployment
scripts for the Sailfish project. Well, we got a new box with WinXP and everything worked except
for kill, which AV's. That sucked!
I looked to find a more recent version, but I haven't been able to find a WinXP resource kit. The other kill replacements I've found don't support "regular" expression kills, which the Sailfish project depends on. Luckily, I found the source for kill and tlist on MSDN. I'm estimating it's the NT4 resource kit version, since it doesn't support killing multiple pids or regexps at once.
So, I hacked at it a little until it did. This one doesn't AV under WinXP. It ain't the prettiest, but it seems to work.
2005-06-03 : We wanted to be able to kill a process and all its child processes, so I had to add that capability. And I added the ability for kill to dump the process list it's looking at.
Microsoft (R) Windows (TM) KILL Copyright (C) 1994-1996 Microsoft Corp. All rights reserved Tweaked by Louis Thomas (2002-08-27) for Win XP compatibility Tweaked by Louis Thomas (2005-06-03) for killing process trees. usage: KILL [options] <<pid> | <pattern>>* [options]: /? This help. /f Force process kill. /s Show process list and exit. /t Kill tree of child processes as well. /- Stop looking for options. <pid> This is the process id for the task to be killed. Use TLIST to get a valid pid <pattern> The pattern can be a complete task name or a regular expression pattern to use as a match. Kill matches the supplied pattern against the task names and the window titles.
You can get the source via anonymous CVS at
cvs -d :pserver:email@example.com:/code-cvsroot co 2002/kill
Due to popular demand, you can download the binary executable as well: kill.exe.
|Louis K. Thomas <loui sth@hotm ail.co m>||Auth||2005-06-03 (4283 days ago)|