unable to install window service using 'servicecontroller'
I want to install a windows service on a remote service. In the following blog you have said to use 'servicecontroller'
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.
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" />
精彩评论