views:

170

answers:

1

Hi, I want to install a windows service on a remote service. In the following blog you have said to use 'servicecontroller'

http://stackoverflow.com/questions/469397/installing-a-win32-service-using-msbuild-and-microsoft-sdc-tasks

However in the 'ServiceController Members' in the .chm file of 'MSBuild Community Tasks' there is no memeber for accepting the path of the service to be installed for ex. 'c:\myservice.exe'

Please suggest how can i achieve the task of installing service remotely.

Thanks, Prasad M.

A: 

The ServiceController task doesn't allow you to install services. It just controls existing services.

I would recommend using the other approach outlined in the question that you reference:

<Exec WorkingDirectory="C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727"
                Command="InstallUtil.exe -i XXX.exe" />
MikeD