Use the exec attribute resolveExecutable="true",
or use an absolute path.
On Jan 28, 2006, at 5:55 PM, Rhino wrote:
I'm having a bit of trouble with an exec task in Windows XP
Professional and I would appreciate a bit of help from the experts
on this mailing list.
I have created a short VBScript that invokes a Microsoft Word
macro; the macro expects exactly two parameters on the command line
and adds the values of these two parameters to a Word document.
When I do this on my Win XP command line, regardless of where I am
in the file system:
"C:\Documents and Settings\Rhino\My Documents\LaunchWdMacro.vbs"
Fred Flintstone
the VBScript works fine and "Fred Flinstone" is written into the
Word document.
However, when I try to do the same thing in Ant, I run into problems.
When I try the exec this way:
<property name="vbs.script" value="c:\Documents and Settings\Rhino
\My Documents\LaunchWdMacro.vbs""/>
<exec executable="cmd.exe" spawn="true">
<arg line="\c ${vbs.script} Fred Flintstone"/>
</exec>
I get no errors from Ant but the name Fred Flintstone has not been
added to the Word document either. I've also tried the exec this
way but with the same result; Fred Flintstone does not get added to
the Word document:
<exec executable="cmd.exe" spawn="true">
<arg value="${vbs.script}"/>
<arg value="Fred"/>
<arg value="Flinstone"/>
</exec>
Can anyone help me figure out what I need to change to make the
exec task work correctly? I need the exec task to run without
errors _and_ I need the parameters passed from the command line to
wind up in the Word document.
I'm sure my VBScript is working fine since it works from the
Windows command line; I just can't quite get it to work from Ant.
---
Rhino
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.14.23/243 - Release Date:
27/01/2006
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
"Home is not where you are born, but where your heart finds peace" -
Tommy Nordgren, "The dying old crone"
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]