ant-user mailing list archives

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

Hello
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="\\172.16.191.2"/>
            <arg value="-u" />
            <arg value="myUser" />
            <arg value="-p" />
            <arg value="myPass" />
            <arg value="-c" />            
            <arg value="runme2.bat" />    
            <arg value="myValue" />      
    </exec>  
</target>

output is:

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


Connecting to 172.16.191.2...


Starting PsExec service on 172.16.191.2...


Connecting with PsExec service on 172.16.191.2...


Copying runme2.bat to 172.16.191.2...


Starting runme2.bat on 172.16.191.2...



runme2.bat exited on 172.16.191.2 with error code 1.



runme2.bat:

::@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


Note:
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: http://old.nabble.com/Psexec-and-ant-tp28827734p28827734.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message