Reputation: 13
I want ANT to execute a .cmd file on windows machine... but the command prompt should not be displayed. the process should be running in background. Ant should just fire the command and proceed with the next command. I even tried using the windows "/B" switch, but it did not work. Does anybody have a suggestion?
Upvotes: 0
Views: 2551
Reputation: 10377
Use exec task like that :
<exec executable="cmd" spawn="true">
<arg value="/c"/>
<arg value="foobar.cmd"/>
</exec>
That should be sufficient, otherwise if you need to use start /B ... :
<exec executable="cmd">
<arg value="/c"/>
<arg value="start"/>
<arg value="/b">
<arg value="foobar.cmd"/>
</exec>
See ant manual exec task for details.
Upvotes: 2