1

I am trying to execute a batch file to copy my files to another server under the 'execute batch or shell script' option of PostBuildScript plugin of jenkins. Below are the commands in my .bat file.

net use \\192.168.20.48 /user:admin password
xcopy "C:\Program Files\Jenkins\workspace\Deployment code Test" "\\DeployServer\Workspace\Builds" /S/E/H/D/Y/V/C/I/K/R/X

When the .bat file is run from a command prompt it runs as expected and completing its actions. My problem is that when I run it through Jenkins it gives following error messages:

System error 1312 has occurred. A specified logon session does not exist. It may already have been terminated. Invalid drive specification 0 File(s) copied

any work around for this..?

4

2 回答 2

2

运行 LocalSystem 帐户时,“net use”命令不可用。更改运行 Jenkins 的帐户,或使用Publish Over CIFS 插件

于 2012-04-24T14:26:18.433 回答
0

任务管理器->服务选项卡->单击服务按钮->选择Jenkins服务->右键单击并转到属性->选择登录选项卡->选择“此帐户”作为登录选项->输入管理员凭据->应用,保存并重新启动服务解决了这个问题。

于 2012-04-25T08:11:03.720 回答