SPWindowsServiceInstance.Enable Method
Enables the service 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 Sub Enable ( _
serviceName As String, _
autoStart As Boolean _
)
'Usage
Dim serviceName As String
Dim autoStart As BooleanSPWindowsServiceInstance.Enable(serviceName, autoStart)
protected internal static void Enable(
string serviceName,
bool autoStart
)
Parameters
serviceName
Type: System.StringA string that contains the Windows name of the service to enable.
autoStart
Type: System.Booleantrue if the service starts automatically; otherwise, false.
See Also
Reference
SPWindowsServiceInstance Class