use strict; use Win32; use Win32::Process; use Win32::Process::Info; my $exe = "yourexe.exe"; my $pi = Win32::Process::Info->new("\\\\someserver.domain.de"); foreach my $hashref ($pi->GetProcInfo()) { my $exitcode = undef; print "Process: $hashref->{Name}\n"; if(lc($hashref->{Name}) eq $exe) { Win32::Process::KillProcess($hashref->{ProcessId}, $exitcode); } }
In reply to Re: using perl to stop processes on windows
by esskar
in thread using perl to stop processes on windows
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |