title: Run Batch file as Other user/Build User from Jenkins
body: <p>How can i call a Windows batch file to run as build user other than the OS User that Jenkins run as. For my situation, Batch has authorization to build user but not the OS user. </p>
  
  <p>I tried to use <a href="http://www.joeware.net/freetools/tools/cpau/" rel="nofollow noreferrer">CPAU</a> supplying user id and password and it works manually when executing the command through CMD window, but not from Jenkins as Jenkins is instantly killing the second window that CPAU opens to run the Batch.</p>
  
  <p>I tried using <a href="https://wiki.jenkins-ci.org/display/JENKINS/Authorize+Project+plugin" rel="nofollow noreferrer">Authorize Plugin</a> and set the Authorization to run as build user. But its failing as batch is still run as OS User, not the build user.</p>
  
  <p>I read some suggestions to use Slave node and run Batch file on Slave node, However I didn't get much help online on how to do so.</p>
  
  <p>Please provide any suggestions to get this issue sorted out.</p>