net use

Execute windows batch command from Jenkins fails but runs fine in cmd.exe

匿名 (未验证) 提交于 2019-12-03 02:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: 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: is a mapped network drive. This runs fine in cmd.exe but when trying to run it in Jenkins, I am getting the error Invalid drive specification . 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