ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Apply argument wrapping with msiexec
Date Wed, 10 Nov 2010 16:14:25 GMT
On 2010-11-09, Bailey, Darragh wrote:

> I have the following target in a project

>   <target name="extract-msi" depends="init" if="target.os.windows" >
>     <mkdir dir="${build.dir}/extract/msi" />
>     <apply executable="msiexec" failonerror="true" >
>       <arg value="/a" /> <!-- administrative install -->
>       <srcfile/>
>       <arg value='TARGETDIR="${build.dir}\extract\msi"' />
>       <fileset dir="${src.dir}" >
>         <include name="**/*.msi" />
>       </fileset>
>     </apply>
>   </target>

> Basically the problem appears to be with the TARGETDIR line. If I
> remove that line, then the msiexec command will run just fine, but
> will extract the msi contents to the wrong location (C:\).

Do you get some sort of error message?

> It seems that despite the claims in the console: The ' characters
> around the executable and arguments are not part of the command.

No, they are not. 8-)

Ant uses an exec() method that passes the parameters as an array of
strings and these strings are not quoted.  In fact quoting may even
cause problems - you may try 

      <arg value='TARGETDIR=${build.dir}\extract\msi' />

i.e. without the double quotes.  It may or may not help.

Stefan

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


Mime
View raw message