ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey N. Solofnenko" <A.Solofne...@mdl.com>
Subject Re: How to set environment via batch script
Date Wed, 30 Jun 2004 03:23:00 GMT
When you start a new process only that process get new environment - it 
is not propagated back into parent process. You need to execute env.bat 
just before ANT or within <exec> task, if the task requires env.bat to run.

- Alexey.

Barry Andrews wrote:

> Hello,
>     I want to be able to invoke a batch script on Windows 2000 that 
> sets up some environment variables. I know that I can use nested <env> 
> elements with <exec>, but I really need to be able to run this script.
>
> <exec executable="cmd.exe">
>     <arg line="/c env.bat"/>
> </exec>
>
> The script does run because I can see the output in the console, but 
> the environment variables are not set when the JVM exits.
>
> Is there a way to do this?
>
>
> many thanks,
>
> Barry
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org


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


Mime
View raw message