Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: determining if a service is alive on a win32 system

by barndoor (Pilgrim)
on Jun 29, 2000 at 21:10 UTC ( #20433=note: print w/replies, xml ) Need Help??

in reply to determining if a service is alive on a win32 system

Below is an example of it's use and how to interpret the results:
use Win32::Service; my %statusHash; Win32::Service::GetStatus("", "EventLog", \%statusHash); print $statusHash{"CurrentState"} . "\n"; # CurrentState can be: # 1 = stopped. # 2 = start pending. # 3 = stop pending. # 4 = running. # 5 = continue pending. # 6 = pause pending. # 7 = paused.
No error check done, Sorry. As you can see GetStatus uses a hash reference to return the results. This contains other stuff like 'Service Type' and other wierd bits. I tried this code on NT4 SP3 and it works fine.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://20433]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2020-03-30 20:24 GMT
Find Nodes?
    Voting Booth?
    To "Disagree to disagree" means to:

    Results (176 votes). Check out past polls.