ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Limor <>
Subject Psexec and ant
Date Wed, 09 Jun 2010 09:07:27 GMT

I'm trying to use Psexec by using ant with no success... 

ant task:
<target name="myName" dir="." output="myOutput">  
    <exec executable="psexec.exe" dir="${build.files}" >
            <arg value="\\"/>
            <arg value="-u" />
            <arg value="myUser" />
            <arg value="-p" />
            <arg value="myPass" />
            <arg value="-c" />            
            <arg value="runme2.bat" />    
            <arg value="myValue" />      

output is:

PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals -

Connecting to

Starting PsExec service on

Connecting with PsExec service on

Copying runme2.bat to

Starting runme2.bat on

runme2.bat exited on with error code 1.


::@echo off 
echo 1 > c:\l.txt
cd "C:\Documents and Settings\Administrator\Desktop\script\">> c:\l.txt

"C:\Documents and Settings\Administrator\Desktop\script\runB.bat" %1 
echo 2 >> c:\l.txt
exit /b 0

when I'm running the same command from cmd it works fine.

Does someone have any suggetions?

Thanks in advance,

View this message in context:
Sent from the Ant - Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message