title: Building my NSIS installer using Jenkins
body: <p>I am very new to Jenkins and want it to build a complete .exe. I set the Repository to a personal URL, now Jenkins do read all the files and copies everything to the Jenkins Workspace. My question is what do I insert into the "Execute Windows Batch Command" block in Jenkins so that it would Compile a <code>NSIS</code> script and store the Setup file in a output file. I have done research into <a href="https://en.wikibooks.org/wiki/Windows_Batch_Scripting" rel="nofollow">Windows Batch Scripting</a> but nothing that could truly help me in this struggle. If I am doing it all wrong I would love some advice to get me on the right track. Here are my current Jenkins codes to read and safe the files from the repository:</p>
  
  <p>1st "Execute Batch Command"</p>
  
  <blockquote>
  <pre><code>COPY "C:\Program Files (x86)\Jenkins\jobs\Job_name\Path\*.*" "C:\Program Files (x86)\Jenkins\jobs\Job_Name\workspace\Output\Installs" /Y
  </code></pre>
  </blockquote>
  
  <p>2nd "Execute Batch Command"</p>
  
  <blockquote>
  <pre><code>del c:\inetpub\wwwroot\downloads\%SVN_REVISION%\*.* /s /f /q
  rmdir "C:\inetpub\wwwroot\downloads\%SVN_REVISION%"
  exit 0
  </code></pre>
  </blockquote>
  
  <p>3rd "Execute Batch Command"</p>
  
  <blockquote>
  <pre><code>MKDIR "C:\inetpub\wwwroot\downloads\%SVN_REVISION%"
  </code></pre>
  </blockquote>
  
  <p>4th "Execute Batch Command"</p>
  
  <blockquote>
    <p>COPY "C:\Program Files (x86)\Jenkins\jobs\Job_Name\workspace\Output\Installs"
    "c:\inetpub\wwwroot\downloads\%SVN_REVISION%"  /Y</p>
  </blockquote>
  
  <p>Now all I want Jenkins to do is open my .nsi script, compile and create the Setup File which then saves in an output folder.</p>