title: Cannot run program "p4": CreateProcess error=2, The system cannot find the file specified
body: <p>I'm developing automate deployment script for Coldfusion project. </p>
  
  <p>Tool: cruisecontrol.net, ant script
  Source control: perforce</p>
  
  <p>Executing the following ant script from cruisecontrol.net i'm getting this error:
  "Cannot run program "p4": CreateProcess error=2, The system cannot find the file specified"</p>
  
  <p>But its working fine from command line:</p>
  
  <pre><code>ant -f deployment.xml
  </code></pre>
  
  <p>deployment.xml file content:</p>
  
  <pre><code>&lt;!-- Get Latest revision from perforce --&gt;
  &lt;echo message="Perforce code base Get Latest revision Started"/&gt;
  &lt;p4sync port="${p4.server}"
  client="${p4.workspace}"
  globalopts="${p4.password}"
  user="${p4.username}"
  view="${p4.branch}"/&gt;
  &lt;echo message="Perforce code base Get Latest revision completed"/&gt;
  </code></pre>
  
  <p>ccnet.config:</p>
  
  <pre><code>&lt;project name="TestMGDeployment"&gt;
     &lt;triggers&gt;
        &lt;intervalTrigger seconds="300" /&gt;
     &lt;/triggers&gt;
     &lt;tasks&gt;
        &lt;exec executable="C:\Apache\apache-ant-1.8.1\bin\ant.bat"&gt;
           &lt;baseDirectory&gt;C:\cruisecontrol\Projects&lt;/baseDirectory&gt;
           &lt;buildArgs&gt;-f deployment.xml&lt;/buildArgs&gt;
        &lt;/exec&gt;
     &lt;/tasks&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Thanks,
  Nagarajan</p>