use Win32::Service;
use strict;

my %hash;
Win32::Service::GetServices("", \%hash);
foreach my $service (sort keys %hash) {
        print "$hash{ $service}\t$service\n";
}

Howard A. Bullock
Global IT Infrastructure

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Unit_Nt_Consultant (E-mail)
Sent: Monday, February 23, 2004 11:20 PM
To: Perl-Win32-Admin (E-mail)
Subject: Win32::Service

I am trying to run Getstatus on different services.

some name I use same as the executable and it works and some when I use
the executable names it doesn't

if I use "net start" it gives me all the names of the services.

question:

my $ret = Win32::Service::GetStatus( $hostname, $service_name, \%stat)

how do I get the service name of all services ?

UNC
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to