执行命令问题 [英] Exec command issues

查看:95
本文介绍了执行命令问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个exec命令来运行一个远程批处理文件,如果手动将其输入到命令行中,当我尝试将其作为msbuild任务运行时,会遇到一个非常普通的错误.这是任务

I have an exec command to run a remote batch file that works if entered manually into the command line, when i try and run it as an msbuild task i get a very generic error. Here is the task


  <Target Name="DeployCode">    <Exec Command="psexec \\247-stes-web1 -s -u Administrator -p **** c:\Deploy\deploy.bat"/>  </Target>

这是错误:

构建失败.

"C:\ Build \ build2.xml" (DeployCode目标)(1)->
(DeployCode目标)->
C:\ Build \ build2.xml(142,2):错误MSB3073:命令"psexec \\ 247-stes-web1 -s -u管理员-p **** c:\ Deploy \ deploy.bat"以代码1退出.

Build FAILED.

"C:\Build\build2.xml" (DeployCode target) (1) ->
(DeployCode target) ->
  C:\Build\build2.xml(142,2): error MSB3073: The command "psexec \\247-stes-web1 -s -u Administrator -p **** c:\Deploy\deploy.bat" exited with code 1.

psexec可以正常连接,但似乎是在执行批处理脚本.

psexec connects fine but it seems to be on the execution of the batch script.

推荐答案

mickyc1,您好,

Hi mickyc1,

将代码修改为:

< Exec 命令 = "psexec \\ 247-stes-web1- s -u管理员-p **** || c:\ Deploy \ deploy.bat" />

然后重试.

确保您的deploy.bat已存在,并且远程计算已存在.

Ensure your deploy.bat existed and your remote compute existed.

如果您对此问题还有其他疑问,请随时告诉我们.

If you have any more concerns about this issue, please feel free to let us know.

最诚挚的问候,

自我


这篇关于执行命令问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆