Re: PID of Service
- From: Ron Bergin <rkb@xxxxxxxxxx>
- Date: Wed, 19 Dec 2007 13:33:08 -0800 (PST)
On Dec 19, 6:07 am, "Ferry Bolhar" <b...@xxxxxxxxxxxxxxxxx> wrote:
Good day to all,
Given the name of a Win32 service, is there a way to find out its PID from a
Perl script?
I looked at Win32::Service and Win32::Daemon modules, but couldn't find a
way for this.
Kind greetings,
--
Ing Ferry Bolhar
Magistrat der Stadt Wien - MA 14
A-1010 Wien
E-Mail: ferdinand.bolhar-nordenka...@xxxxxxxxxx
use strict;
use warnings;
use Win32::Process::Info;
my $pi = Win32::Process::Info->new ();
my ($info) = grep {$_->{Name} =~ m/msnmsgr/} $pi->GetProcInfo();
print $info->{ProcessId};
.
- References:
- PID of Service
- From: Ferry Bolhar
- PID of Service
- Prev by Date: FAQ 4.5 How do I convert between numeric representations/bases/radixes?
- Next by Date: Re: regex question about ?, *, and $1
- Previous by thread: Re: PID of Service
- Next by thread: Re: A problem with Perl 5.10.0 installation
- Index(es):
Relevant Pages
|