PeanutButter
Loading...
Searching...
No Matches
PeanutButter.WindowsServiceManagement Namespace Reference

Classes

interface  IServiceControlInterface
 Provides a mechanism for controlling windows services. More...
interface  IWindowsServiceUtil
 The Windows Service Utility contract. More...
class  Messages
class  NativeWindowsServiceUtil
 The legacy, native WindowsServiceUtil which uses the win32api to provide service management. More...
class  RegKey
class  ServiceControlException
 Thrown when a service control request (eg start/stop/pause/continue) cannot be completed. More...
class  ServiceControlInterface
class  ServiceControlKeys
class  ServiceOperationNames
class  Win32Api
class  WindowsServiceUtil
 The cross-environment WindowsServiceUtil, backed by commands to sc.exe. More...

Enumerations

enum  KillServiceResult { NotRunning , Killed , UnableToKill }
 The result of attempting to kill a service. More...
enum  ServiceStartupTypes {
  DelayedAutomatic = -2 , Unknown = -1 , Boot = 0 , System = 1 ,
  Automatic = 2 , Manual = 3 , Disabled = 4
}
 Startup types for services. More...
enum  ServiceState {
  Unknown = -1 , NotFound = 0 , Stopped = 1 , StartPending = 2 ,
  StopPending = 3 , Running = 4 , ContinuePending = 5 , PausePending = 6 ,
  Paused = 7
}
 Possible run-states for services. More...
enum  ControlOptions { None = 0 , Wait = 1 , Force = 2 }
 Options for control operations. More...

Enumeration Type Documentation

◆ ControlOptions

Options for control operations.

Enumerator
None 

No options - operation could run in the background and will not be forced.

Wait 

Wait for the operation to complete.

Force 

Force the operation to complete if possible, if the time-limit for waiting is exceeded. Specifying Force implies waiting.

◆ KillServiceResult

The result of attempting to kill a service.

Enumerator
NotRunning 

Service was already not running.

Killed 

Service was terminated.

UnableToKill 

Unable to terminate service, possibly due to permissions.

◆ ServiceStartupTypes

Startup types for services.

Enumerator
DelayedAutomatic 

Delayed start, automatic.

Unknown 

Unkown.

Boot 

Applies to drivers, not services.

System 

Applies to drivers, not services.

Automatic 

Automatic start.

Manual 

Manual start.

Disabled 

Start is disabled.

◆ ServiceState

Possible run-states for services.

Enumerator
Unknown 

Unknown.

NotFound 

Service not found.

Stopped 

Service is stopped.

StartPending 

Service is starting up.

StopPending 

Service is stopping.

Running 

Service is running.

ContinuePending 

Service is continuing.

PausePending 

Service is pausing.

Paused 

Service is paused.