You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "David F. White" <dw...@opentext.com> on 2004/07/22 18:47:09 UTC

Task and PATH Environment Variable on Windows

Does anyone know why Ant will not allow the PATH environment variable to be 
set for using the "exec" task on Windows?  Is this a Java security issue?

<exec executable="devenv" dir="${project.dir}" os="Windows 2000" 
vmlauncher="false">			
	<env key="PATH" path="${path.dir}" />
	<env key="INCLUDE" path="${include.dir}" />
	<env key="LIB" path="${lib.dir}" />
	<env key="VSINSTALLDIR" path="${vsinstall.dir}" />
	<env key="VCINSTALLDIR" path="${MSVC_ROOT}" />
	<env key="VS71COMNTOOLS" path="${vs71comntools.dir}" />
	<env key="FrameworkDir" path="${framework.dir}" />
	<env key="FrameworkVersion" value="${FRAMEWORK_VERSION}" />
	<env key="FrameworkSDKDir" path="${frameworkSDK.dir}" />
	<env key="MSVCDir" path="${msvc.dir}" />					
	<arg line="myproject.sln /useenv /rebuild Debug" />
</exec>		

In the above example all of the environment variables are set except for 
PATH.  The only way I've found around this problem is to use "exec" to 
launch a batch file.  The batch file then sets the PATH variable and 
launches the command to build my project.

Thanks...

Dave



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