As part of an installer, I need to run a batch file from ANT. If I run cmd.exe as Administrator and run the batch file, all is well since it has the appropriate administrative privileges. When the batch file is executed from ant, it fails, the same way it does if I were to run the batch file without administrative privileges. My question is, how can I run this batch file in Administrative mode from my ANT script?
<exec executable="cmd.exe" output="dir.txt" dir="c:/bin/">
<arg line="/c service.bat install"/>
</exec>