package ProcessCleaner ;
#Purpose : kill specified processes on Windows XP machine
sub killProcesses {
my @passed_array = shift ;
my @procsToLookFor = split(/ / , @passed_array ); #get the names of the hanging apps to check
for(grep/\S/,`tasklist /v /nh`) {
chomp;my($p,$i,$u,$t)=unpack'A24A8x56A50x14A*',$_;$p="$p $t" unless $t
eq'N/A';$p=~s/ +/ /g;$i+=0;$u=~tr/ /_/;
#debug print"$i $u $p\n" ; #if we want the username who owns that process
foreach (@procsToLookFor) {
if ($p =~m/$_/ig ) #if found searchable
{ print "Killing $p with process ID : $i " ;
$cmd = "taskkill /PID $i /T /F" ;
`$cmd` ; #execute command
sleep 1 ;
}
}
}
} #eof sub killProcesses
#comments suggestions ?!
Getting the Current TabItem when the Tab is not selected in WPF
-
[image: Banner]
This is a quick reminder to self on how to retrieve a TabItem from a WPF
TabControl *when the tab is not currently selected* because I ru...
2 weeks ago
No comments:
Post a Comment
- the first minus - Comments have to be moderated because of the spammers
- the second minus - I am very lazy at moderating comments ... hardly find time ...
- the third minus - Short links are no good for security ...
- The REAL PLUS : Any critic and positive feedback is better than none, so your comments will be published sooner or later !!!!