如何在不使用 psexec 的情况下在 msbuild 中的远程计算机上安装 msi?
我搜索了Extension Pack和Community Tasks中的所有自定义任务,最终在SDC
Tasks中找到了一个名为Msi.Istall的任务。但文档很糟糕并且会导致问题。我收到有关传递给安装程序的属性的错误。
以下是我的安装目标:
`<Target Name="Install">
<!-- Copy the MSI package into remote pc. -->
<!--<CreateItem Include="\\grpdev1\Sharing\Build Script\Server Applications\**\*.*">
<Output ItemName="Source" TaskParameter="Include"/>
</CreateItem>
<Copy SourceFiles="@(Source)" DestinationFolder="\\lta0\c$\TestRemoteInstall\%(Source.RecursiveDir)"/>-->
似乎它会查看我自己的本地电脑来安装它,并说该产品已安装并且需要删除。 我还如何
指定远程机器?有什么想法我哪里出错了吗?我还被要求不要使用 psexec 工具或中间脚本。希望直接从 msbuild 任务安装。
I have searched all the custom tasks in Extension Pack and Community Tasks and finally found a task called Msi.Istall in SDC
Tasks. But the documentation is bad and causes problems. I get errors regarding the properties passed to the installer.
Below is my Install target :
`<Target Name="Install">
<!-- Copy the MSI package into remote pc. -->
<!--<CreateItem Include="\\grpdev1\Sharing\Build Script\Server Applications\**\*.*">
<Output ItemName="Source" TaskParameter="Include"/>
</CreateItem>
<Copy SourceFiles="@(Source)" DestinationFolder="\\lta0\c$\TestRemoteInstall\%(Source.RecursiveDir)"/>-->
Seems like it looks at my own local pc to install it and says the product is already installed and needs to be removed. How
else do i specify the remote machine? Any ideas where I am going wrong? I have also been asked not to use psexec tool or intermediate scripts.. Looking to install directly from msbuild task.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到了类似的问题...这不是最好的解决方案,但我急需一些东西...
我在远程计算机上设置了一个计划任务,该任务启动批处理文件。批处理文件卸载并重新安装我的 msi 软件包。
在我的构建计算机上,在构建过程中使用 schtasks.exe 调用计划任务。我的目标文件中有一个执行任务,如下所示:
schtasks.exe 应该作为操作系统的一部分位于 system32 中。
凯文·斯彭斯
I had a similar issue... It's not the best solution, but I needed something in a hurry...
I set up a scheduled task on the remote machine which launches a batch file. The batch file uninstalls and reinstalls my msi package.
From my build machine, the scheduled task is called during the build using schtasks.exe. I have an exec task in my targets file like the following:
schtasks.exe should be located as part of the OS in system32.
Kevin Spence