开发者

install a service on a remote computer from a MSBuild script

开发者 https://www.devze.com 2022-12-27 06:50 出处:网络
I have this task that creates a service: Target Name=\"InstallService\" DependsOnTarget开发者_JAVA技巧s=\"CopyFiles\"

I have this task that creates a service:

Target Name="InstallService" DependsOnTarget开发者_JAVA技巧s="CopyFiles"

Exec Command="sc \ \remotecomputer create "ServiceHost" binPath= "E:\ServiceHost.exe" DisplayName= "ServiceHost"" WorkingDirectory="c:\" ContinueOnError="false" /Target

The problem is that when I run this script it doesn't know the \ \remotecomputer.


I figured it out: you have to use it like this: """\ \remotecomputer"""

0

精彩评论

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