title: ant task with exec returning error 7
body: <p>I am trying to build using an Ant task that uses exec. Here is a snippet of my task:</p>
  
  <pre><code>&lt;exec executable="cmd" failonerror="true" osfamily="windows"&gt;
                      &lt;arg value="/c" /&gt;
                      &lt;arg value="${path.installer}" /&gt;
                      &lt;arg value="-silent"/&gt;
                      &lt;arg value="-allowDownload"/&gt;
                      &lt;arg value="-eulaAccepted"/&gt;
  &lt;/exec&gt;
  </code></pre>
  
  <p>This is essentially an installer. When I am trying to run the installer (.exe) from the path, I am getting the following error:
  C:\Users\abc\jenkins\install.xml:57: exec returned: 7 (line 57 points to beginning of exec)</p>
  
  <p>I ran ant with verbose option to get more details:</p>
  
  <pre><code>[antcall] Exiting C:\Users\abc\jenkins\install.xml.
  [echo] Installing new build from C:\Users\abc\jenkins\BA\integration_win\Nuze.exe
  [exec] Current OS is Windows 7
  [exec] Executing 'cmd' with arguments:
  [exec] '/c'
  [exec] 'C:\Users\abc\jenkins\BA\integration_win\Nuze.exe
  [exec] '-silent'
  [exec] '-allowDownload'
  [exec] '-eulaAccepted'
  [exec]
  [exec] The ' characters around the executable and arguments are
  [exec] not part of the command.
  target 'install.nuze' failed with message 'exec returned: 7'.
  BUILD FAILED
  C:\Users\abc\jenkins\install.xml57: exec returned: 7
  at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:646)
  at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:672)
  at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:498)
  at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
  at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav:106)
  at org.apache.tools.ant.Task.perform(Task.java:348)
  at org.apache.tools.ant.Target.execute(Target.java:392)
  at org.apache.tools.ant.Target.performTasks(Target.java:413)
  at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
  at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
  at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExeutor.java:41)
  at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
  at org.apache.tools.ant.Main.runBuild(Main.java:811)
  at org.apache.tools.ant.Main.startAnt(Main.java:217)
  at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
  at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
  </code></pre>
  
  <p>Also I can confirm that my Jenkins slave has access to C:\Users\abc\jenkins\BA\integration_win\Nuze.exe
   and I can install manually from that location without any issues. Any idea on where I am erring? I looked up error codes, but generally the tip I got is that there could be some issue with ant configuration. Any pointers? Thanks a ton in advance for the help.</p>