English 中文(简体)
Using PSExec from within CruiseControl .NET
原标题:

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:Utilitiespsexec.exe</executable>
      <buildArgs>-u [UNAME] -p [PWD] "C:UtilitiesJoel.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:UtilitiesJoel.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

问题回答

Run CruiseControl service under administrator account

Have you tried any other psexec options?

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

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





相关问题
Create directory using Nant

Not sure if I m just totally missing it but I couldn t not figure out how to create a new directory using Nant. Is there built in functionality to do this? Can I just use the command prompt? I tried ...

Setting write permissions on godaddy hosting

I have godaddy asp.net hosting. Every time I upload the build, it’s a manual laborious task of setting write permissions (to folders) through the web interface. Is this any way to automate this ...

What are solid NMaven or build servers for .NET alternatives?

Maven had a long history and is well supported in the Java world. NMaven has received a less successful start and has never become as popular in the C#/.NET world as its larger cousin was in the Java ...

Gallio and MbUnit in NAnt

I am trying to use Gallio (v3.1)/MbUnit/NCover to run a unit test in my C# code, as part of the build process for my continuous integration system. I can get Gallio.Echo.exe to execute the tests and ...

TeamCity NUnit test result visualisation

Is there any way to produce visual results of NUnit tests from within TeamCity s "Tests" tab, currently my NAnt script outputs an .xml file of the results using the following task: <nunit2 ...

building .net applications without Visual Studio

I m interested to hear about people working with building .net applications using MSBuild, NAnt or similar tools. What are you using, why are you using it instead of the VS IDE? I like to use ...

热门标签