Book HomeJava and XSLTSearch this book

22.17. Win32::Service

The Win32::Service module provides a service control interface. It allows you to start, pause, resume, and stop Windows NT system services from Perl scripts.

The following functions are exported by this module. The host argument in each function gives the hostname of the machine a service is running (or will run) on. If you supply a null string (""), the local machine will be assumed.

GetServices

GetServices (host, \%hash)

Returns a list of services on host to the hash referenced by hash.

GetStatus

GetStatus (host, service, \%status)

Returns the status of service as a hash referenced by status. The keys for this hash are:

ServiceType 
CurrentState 
ControlsAccepted 
Win32ExitCode 
ServiceSpecificExitCode 
CheckPoint 
WaitHint
PauseService

PauseService (host, service)

Pauses the named service on machine host (only if the service is able to pause).

ResumeService

ResumeService (host, service)

Resumes a paused service on host.

StartService

StartService (host, service)

Starts the named service on the machine host. The specified service must be registered with the Service Control Manager.

StopService

StopService (host, service)

Stops the named service on machine host.



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.