SPWindowsServiceInstance.IsDisabled method
Returns a Boolean value that indicates whether the Windows service is disabled on the local computer.
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Protected Friend Shared Function IsDisabled ( _
serviceName As String _
) As Boolean
'Usage
Dim serviceName As String
Dim returnValue As Boolean
returnValue = SPWindowsServiceInstance.IsDisabled(serviceName)
protected internal static bool IsDisabled(
string serviceName
)
Parameters
serviceName
Type: System.StringA string that contains the Windows name of the service.
Return value
Type: System.Boolean
true if the Windows service is disabled; otherwise, false.
See also
Reference
SPWindowsServiceInstance class