Thread Win32 Process killen (7 answers)
Opened by malachay at 2005-11-01 17:27

esskar
 2005-11-01 18:13
#59547 #59547
User since
2003-08-04
7321 Artikel
ModeratorIn

user image
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl

use strict;
use warnings;

use Win32::Process;
use Win32::Process::Info;

my $pi = Win32::Process::Info->new;

my @procs = $pi->GetProcInfo();
foreach my $p (@procs) {
print $p->{Name}, " Pid: ", $p->{ProcessId}, "\n";
if(index($p->{Name}, "excel") > -1) {
Win32::Process::KillProcess($p->{ProcessId}, 255);
}
}

View full thread Win32 Process killen