0

I am using following command to install a service via MSBuild file. This works great

 <Exec Command= 'c:\test\myService.Appservices.exe install' ContinueOnError='false' />

But the above command install the service on local machine. I want to install the service on a remote machine. How can I specify the machine name using this command?

4

1 回答 1

4

根据 Mike Vine 的评论,MSBuild 不包括用于远程执行的工具。但是,您可以使用类似psexec的东西。例如

<Exec Command='psexec -accepteula -s \\RemoteServer "C:\Path To EXE on Remote Machine\my.EXE"' IgnoreExitCode="false" ContinueOnError="false" Timeout="600000" >
    <Output TaskParameter="ExitCode" PropertyName="exitCode1"/>
</Exec>
于 2013-05-28T12:05:48.467 回答