ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Allers" <>
Subject RE: Spaces in a command line arg
Date Tue, 25 Feb 2003 22:17:50 GMT
I have a custom task which invokes InstallShield Multiplatform 4.53
builds. It does what has been suggested before which is use <arg
value="" /> instead of <arg line="" />. I hope you find it helpful.

Example usage:
    	<installshield installscript="install/product.xml"
            installshielddir="C:\Program Files\InstallShield\MP45">
		<!-- optional classpath, appends this classpath to the
expected installshield classpath -->
    		<classpath refid="custombeans.path" />
		<!-- optional alias -->
    		<alias name="ALIAS_1" dir="install" />

The 'installshield' task can also have attributes 'xsl' (XSL file),
'save' (whether or not to save the modification in the project), and
'saveas' (file to save the modified script to).

-----Original Message-----
From: David Clements [] 
Sent: Tuesday, February 25, 2003 3:35 PM
To: 'Ant Users List'
Subject: RE: Spaces in a command line arg

I am using the exec task to launch InstallShiels Multiplatform.  The
path in question ${productImportDirectory} has a space in it.  Neither
single or double quotes worked.  However if I use a combinatio of both
single and double quotes things are working great.
<exec executable="${ISMPDirectory}\ismpc.exe" dir="${ISMPDirectory}" >
            <arg line='"${ISMPFile}"'/>
            <arg line ='-alias IS_PRD=${productImportDirectory}'/>
            <arg line ='-alias IS_INSTALLFILES="C:\vgdev\testing
            <arg line="-xsl"/>
            <arg line="-build"/>

 [exec] Initializing InstallShield MultiPlatform 4.5...
 [exec] Searching for Java(tm) Virtual Machine...
 [exec] Verifying Jview 1.1.4 by Microsoft
 [exec] .
 [exec] Verifying Jview 1.1.4 by Microsoft
 [exec] ........Setting alias IS_PRD to C:\vgdev\testing
 [exec] illegal command line argument :

 [exec] Running InstallShield MultiPlatform 4.5...

 [exec] Result: -3

Hope this helps,


> -----Original Message-----
> From: Conor MacNeill []
> Sent: Saturday, February 22, 2003 1:12 AM
> To: Ant Users List
> Subject: Re: Spaces in a command line arg
> David Clements wrote:
> > Is there a way to get ant to escape possible space in an
> <arg> to and
> > <exec> call?
> > 
> > 
> If you use the <arg value=""> approach with an entry per
> argument, rather 
> than all arguments in the <arg line=""> style, it should 
> quote arguments 
> with spaces. If this doesn't work for you, please give us 
> more detils on how 
> it fails.
> Conor
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message