This project is read-only.

Conditions using MSBUILD Extension pack

Oct 22, 2009 at 5:56 PM
Edited Oct 22, 2009 at 7:27 PM

Hello All,

Im using the follwing to uninstall my service when a build runs:

MSBuild.ExtensionPack.Computer.WindowsService TaskAction="Uninstall" ServiceName="__TestService1" ServicePath="c:\WINDOWS\system32\taskmgr.exe" RemoteUser="$(RemoteUser)" RemoteUserPassword="$(RemoteUserPassword)" MachineName="$(RemoteMachine)" />

This entry is in my target file.

How do I write conditions to uninstall a service only if it already exsists?

Oct 23, 2009 at 1:36 PM

If the service does not exist, then the task should not attempt to uninstall it. If you run with /v:diag, you should see a message saying "Service does not exist: YOURSERVICE on MACHINENAME".