I'm trying to use ant to set environment variables in windows xp. I have gotten it to set environment variables using setx.exe, but that does not set it for the current command window. I tried calling set but the changes do not seem to be taking to the current window.
Here is the code: (from my install.xml)
<exec executable="cmd" os="Windows XP" input="env_vars1.txt">
</exec>
And inside env_vars1.txt, I am using the set command in the following matter.
set JAVA_HOME=C:\j2sdk1.4.2_06
I've tried using various variations of this (with and without quotes), but nothing takes. It does say it is setting, but nothing takes. And i've copied and pasted that exact command into the command window and windows accepts it....so I am quite positive it is correct.
Anyone have a suggestion? Thanks.
Here is the code: (from my install.xml)
<exec executable="cmd" os="Windows XP" input="env_vars1.txt">
</exec>
And inside env_vars1.txt, I am using the set command in the following matter.
set JAVA_HOME=C:\j2sdk1.4.2_06
I've tried using various variations of this (with and without quotes), but nothing takes. It does say it is setting, but nothing takes. And i've copied and pasted that exact command into the command window and windows accepts it....so I am quite positive it is correct.
Anyone have a suggestion? Thanks.