22.17. Win32::ServiceThe 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 (host, \%hash) Returns a list of services on host to the hash referenced by hash.
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 (host, service) Pauses the named service on machine host (only if the service is able to pause).
StartService (host, service) Starts the named service on the machine host. The specified service must be registered with the Service Control Manager. Copyright © 2002 O'Reilly & Associates. All rights reserved. |
|