在詹金斯运行批处理命令 [英] Run batch command in jenkins

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

问题描述

我作为服务运行Windows 7詹金斯。

I'm running jenkins on windows 7 as a service.

我想运行一个非常简单的工作,这将开始我的Firefox浏览器。 (例如)

I'd like to run a very simple job which will start my firefox. (for example)

我配置了一个自由的风格项目,并成立了执行窗口批处理命令选项。

I configured a free style project and set up the "Execute windows batch command" option.

在这里,我试图插入夫妇的命令,他们都失败了。

Here i have tried to insert couple of command which they all failed.

命令,如回声你好或其他本地命令预期工作。

Commands like "echo hello" or other native command working as expected.

但像资源管理器命令 - 应打开提到的目录,或c:\\ firefox.lnk(应该打开Firefox)不工作。
詹金斯似乎运行,但之后当作业因错误而失败。

But command like "explorer " - should open the mentioned directory, or "c:\firefox.lnk" (should open firefox) are not working. The jenkins seems to be running but after while the job fails with an error.

我如何运行这些动作?

How can i run these actions?

感谢。

推荐答案

这可能是一个路径问题,检查系统的用户在其路径探险家。 (见<一href=\"http://antagonisticpleiotropy.blogspot.nl/2012/08/running-jenkins-in-windows-with-regular.html\" rel=\"nofollow\">http://antagonisticpleiotropy.blogspot.nl/2012/08/running-jenkins-in-windows-with-regular.html)

This might be a path issue, check if the System user has 'explorer' in its path. (see http://antagonisticpleiotropy.blogspot.nl/2012/08/running-jenkins-in-windows-with-regular.html)

此外:Windows 7中不允许服务流程来创建UI。看到这个计算器的其他问题:<一href=\"http://stackoverflow.com/questions/3798612/service-starting-a-process-wont-show-gui-c-sharp\">Service启动过程中不会显示GUI C#

Additionally: Windows 7 does not allow service processes to create a UI. See this other stackoverflow question: Service starting a process wont show GUI C#

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

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