在 CruiseControl .NET 中使用 PSExec

发布于 2024-08-25 03:36:27 字数 1089 浏览 7 评论 0原文

我正在尝试从 CC.NET 调用 PSExec 任务,但遇到了一些困难。

这是 CC 项目

<project name="Test">
  <tasks>
    <exec>
      <executable>C:\Utilities\psexec.exe</executable>
      <buildArgs>-u [UNAME] -p [PWD] "C:\Utilities\Joel.bat"</buildArgs>
    </exec>
   </tasks>
 </project>

这是 Joel.bat 的源代码

CLS
@ECHO OFF

发生的情况是,我第一次强制项目构建时,它运行成功。 PSExec 任务启动并执行 Joel.bat 文件。我在构建日志中获得一些有关退出代码的信息,但任务成功。

这是构建日志输出。

PsExec v1.97 - Execute processes remotely
Copyright (C) 2001-2009 Mark Russinovich
Sysinternals - www.sysinternals.com
C:\Utilities\Joel.bat exited with error code 0.

第二次强制构建时,我收到可怕的“应用程序无法正确初始化(0xc0000142)”错误消息。我无法多次运行构建

,因此,如果我尝试从服务 MSC 中关闭巡航控制 .net 服务,则无法关闭。就好像某个地方有一把锁,被占用了却没有被释放。我可以终止该服务的唯一方法是终止 ccservices.exe 进程。

我已经使用 nant 任务尝试了完全相同的事情,并得到了完全相同的结果。它第一次工作,第二次失败,我无法关闭该过程。

我不确定这是否是 CC.NET 或 PSEXEC(当然还有我)的问题。

有人有什么想法吗?我也在 CC.NET 论坛上发帖。

我正在使用最新最好的 PSExec 和 CC.NET 1.4.4。

谢谢,乔尔

I'm trying to call a PSExec task from CC.NET and running into some difficulties.

Here's the CC project

<project name="Test">
  <tasks>
    <exec>
      <executable>C:\Utilities\psexec.exe</executable>
      <buildArgs>-u [UNAME] -p [PWD] "C:\Utilities\Joel.bat"</buildArgs>
    </exec>
   </tasks>
 </project>

Here's the source of Joel.bat

CLS
@ECHO OFF

What happens is that the first time I force the project to build, it runs successfully. The PSExec task is kicked off and the Joel.bat file is executed. I get some information in the build log about exit codes, but the task is successful.

Here's the build log output.

PsExec v1.97 - Execute processes remotely
Copyright (C) 2001-2009 Mark Russinovich
Sysinternals - www.sysinternals.com
C:\Utilities\Joel.bat exited with error code 0.

The second time I force the build I get the dreaded "The Application failed to initialize properly (0xc0000142)" error message. I can't ever run the build more than once

More so, if I try to shut down the cruise control .net service from within the services MSC, it can't. It's like there's a lock somewhere that is taken and not released. The only way I can kill the service is by killing the ccservices.exe process.

I've tried the exact same thing using an nant task and gotten the exact same results. It works the first time, and fails the second and I can't shutdown the process.

I'm not sure if this is an issue with CC.NET or with PSEXEC (or me of course).

Anybody got any ideas? I'm posting to the CC.NET forums as well.

I'm using the latest and greatest of PSExec and 1.4.4 of CC.NET.

Thx, Joel

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

几度春秋 2024-09-01 03:36:27

在管理员帐户下运行 CruiseControl 服务

Run CruiseControl service under administrator account

辞慾 2024-09-01 03:36:27

您是否尝试过任何其他 psexec 选项

-d Don't wait for application to terminate. Only use this option for non-interactive applications.

Have you tried any other psexec options?

-d Don't wait for application to terminate. Only use this option for non-interactive applications.
眼睛会笑 2024-09-01 03:36:27

也许是旧的 eula 问题,请尝试 psexec 的 /accepteula 选项

maybe its the old eula problem, try the /accepteula option for psexec

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文