Click or drag to resize

Utils_Service Class

Windows Services utilities.
Inheritance Hierarchy
SystemObject
  MicaSystems.UtilsUtils_Service

Namespace:  MicaSystems.Utils
Assembly:  MicaSystems.Utils (in MicaSystems.Utils.dll) Version: 1.0.0.0 (1.1.0.123)
Syntax
C#
public static class Utils_Service

The Utils_Service type exposes the following members.

Methods
  NameDescription
Public methodStatic memberDoesServiceExist
Checks if a service exists.
Public methodStatic memberGetService
Get a windows service by its name.
Public methodStatic memberGetService2
Get a windows service by its name.
Public methodStatic memberGetServiceProcessId
Gets the id of a Windows Service.
Public methodStatic memberIsRunning(ManagementObject)
Checks if a service status is not stopped.
Public methodStatic memberIsRunning(ServiceController)
Checks if a service status is Running.
Public methodStatic memberIsStopped(ManagementObject)
Checks if a service status is stopped.
Public methodStatic memberIsStopped(ServiceController)
Checks if a service status is not Running.
Public methodStatic memberStartService(ManagementObject)
Starts the service if it is stopped.
Public methodStatic memberStartService(ServiceController)
Starts the service if it is stopped. This method will also wait for the service to be running.
Public methodStatic memberStopService(ManagementObject)
Stops the service if it is running.
Public methodStatic memberStopService(ServiceController)
Stops the service if it is running. This method will also wait for the service to be stopped.
Public methodStatic memberTryGetServiceProcessId
Tries to get the id of a Windows Service.
Top
See Also