How to set the path environment variable from ant script
You can use setx command to set the environment variables.
For setx command help refer http://ss64.com/nt/setx.html
<exec executable="setx.exe"> <arg line="Path C:\jdk1.5.0_12\bin"/> <arg line="/m"/> </exec>