This documentation is archived and is not being maintained.

ServiceController.Start Method (String[])

.NET Framework 1.1

Starts a service, passing the specified arguments.

[Visual Basic]
Overloads Public Sub Start( _
   ByVal args() As String _
)
[C#]
public void Start(
 string[] args
);
[C++]
public: void Start(
 String* args __gc[]
);
[JScript]
public function Start(
   args : String[]
);

Parameters

args
An array of arguments to pass to the service when it starts.

Exceptions

Exception Type Condition
Win32Exception An error occurred when accessing a system API.
InvalidOperationException The service cannot be started.

Remarks

You cannot call Stop for the service until the service controller status is Running.

Requirements

Platforms: Windows NT Server 4.0, Windows NT Workstation 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

ServiceController Class | ServiceController Members | System.ServiceProcess Namespace | ServiceController.Start Overload List | Stop | Status

Show: