开发者

unable to install window service using 'servicecontroller'

开发者 https://www.devze.com 2022-12-13 15:40 出处:网络
I want to install a windows service on a remote service. In the following blog you have said to use \'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" />
0

精彩评论

暂无评论...
验证码 换一张
取 消