NAnt SDK Documentation - v0.85-nightly-2005-11-09

ServiceControllerTask Class

[This is preliminary documentation and subject to change.]

Allows a Windows service to be controlled.

For a list of all members of this type, see ServiceControllerTask Members.

System.Object
   NAnt.Core.Element
      NAnt.Core.Task
         NAnt.MSNet.Tasks.ServiceControllerTask

[Visual Basic]
<TaskName(Name:="servicecontroller")>
Public Class ServiceControllerTask
    Inherits Task
[C#]
[TaskName(Name="servicecontroller")]
public class ServiceControllerTask : Task

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Missing <remarks> documentation for T:NAnt.MSNet.Tasks.ServiceControllerTask

Example

Starts the World Wide Web Publishing Service on the local computer.

                
            <servicecontroller action="Start" service="w3svc" />
                
              

Stops the Alerter service on computer 'MOTHER'.

                
            <servicecontroller action="Stop" service="Alerter" machine="MOTHER" />
                
              

Requirements

Namespace: NAnt.MSNet.Tasks

Assembly: NAnt.MSNetTasks (in NAnt.MSNetTasks.dll)

See Also

ServiceControllerTask Members | NAnt.MSNet.Tasks Namespace