执行Windows批处理命令从詹金斯失败,但在运行cmd.exe的罚款 [英] Execute windows batch command from Jenkins fails but runs fine in cmd.exe

查看:2760
本文介绍了执行Windows批处理命令从詹金斯失败,但在运行cmd.exe的罚款的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想一个的MSBuild后运行在詹金斯此命令

I am trying to run this command in jenkins after a MSbuild

xcopy "C:\Program Files (x86)\Jenkins\workspace\trunk\Projects\results\results\obj\Debug\Package\PackageTmp" "Y:\Extraction_Zone\Jenkins\" /E 

Y:是映射网络驱动器。这将运行在cmd.exe的罚款,但试图在詹金斯运行它的时候,我得到错误无效驱动器规格

下面是从詹金斯的输出:

Here is the output from jenkins:

Time Elapsed 00:00:04.03
[trunk] $ cmd /c call C:\Windows\TEMP\hudson3389873107474371072.bat

C:\Program Files (x86)\Jenkins\workspace\trunk>xcopy "C:\Program Files (x86)\Jenkins\workspace\trunk\Projects\results\results\obj\Debug\Package\PackageTmp" "Y:\Extraction_Zone\Jenkins\" /E 
Invalid drive specification
0 File(s) copied

C:\Program Files (x86)\Jenkins\workspace\trunk>exit 4 
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE

任何帮助将是AP preciated。

Any help would be appreciated.

推荐答案

我也曾经有过类似的问题一次。尝试给予詹金斯服务作为登录该帐户有权根据 SERVICES.MSC ,并确保该帐户键入有相同的使用运行<$ C一$ C>的cmd.exe 。

I too had a similar issue once. Try granting the Jenkins service "Logon as This account" right under services.msc and make sure the account you type there is the same as the one you use for running cmd.exe.

这篇关于执行Windows批处理命令从詹金斯失败,但在运行cmd.exe的罚款的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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