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)
Available in Sandboxed Solutions: No

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.String

    A 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

SPWindowsServiceInstance Members

Microsoft.SharePoint.Administration Namespace