title: Calling .bat file from specific location with CCNET
body: <p>I have setup Sonar and want to run the code analysis as part of my nightly build.</p>
  
  <p>I've setup the nightly build but I'm having some issues with running the sonar runner.</p>
  
  <p>To run code analysis I want to navigate to a folder I've created called \BuildAssets, inside the main solution folder.  To run the code analysis manually I would open up a command prompt within \BuildAssets and run: <code>%SONAR_RUNNER_HOME%\Bin\sonar-runner.bat</code></p>
  
  <p>How would I set this up in CCNET?</p>
  
  <p>I've tried:</p>
  
  <pre><code>&lt;exec&gt; 
    &lt;executable&gt;%SONAR_RUNNER_HOME%\bin\sonar-runner.bat&lt;/executable&gt;
    &lt;baseDirectory&gt;BuildAssets&lt;/baseDirectory&gt;
    &lt;buildTimeoutSeconds&gt;$(slowBuildTimeout)&lt;/buildTimeoutSeconds&gt;
  &lt;/exec&gt;
  </code></pre>
  
  <p>but this doesn't work because it tries to run <code>c:\cc\myBuild\code\BuildAssets\%SONAR_RUNNER_HOME%\bin\sonar-runner.bat</code></p>
  
  <p>I also tried:</p>
  
  <pre><code>&lt;exec&gt; 
    &lt;executable&gt;cmd&lt;/executable&gt;
    &lt;baseDirectory&gt;BuildAssets&lt;/baseDirectory&gt;
    &lt;buildArgs&gt;%SONAR_RUNNER_HOME%\bin\sonar-runner&lt;/buildArgs&gt;
    &lt;buildTimeoutSeconds&gt;$(slowBuildTimeout)&lt;/buildTimeoutSeconds&gt;
  &lt;/exec&gt;
  </code></pre>
  
  <p>but this doesn't seem to do anything either.  I'm sure it's pretty easy but I'm not well versed in CCNET configuration.</p>