NAntContrib
Help
Function Reference
service::is-installed |
v0.92 |
Returns a value indicating whether the specified service is installed on a given machine.
bool service::is-installed(service, machineName)
| Name | Type | Description |
|---|---|---|
| service | string | The short name that identifies the service to the system. |
| machineName | string | The computer on which the service resides. |
The following example starts the "World Wide Web Publishing" service if it's installed on the local computer.
<if test="${service::is-installed('World Wide Web Publishing', '.')}">
<servicecontroller action="Start" service="World Wide Web Publishing" />
</if>