title: Executing windows batch command in Jenkins keeps failing with Exit-1 state
body: <p>I am testing out "<strong>Jenkins ver. 2.89.4</strong>" in Windows10 Machine and I have configured a simple job to test out few things. Under Build section in Jenkins, I have used "<strong>Execute Windows Batch Command</strong>" and used the following two commands. Both the below commands executes fine in the command prompt but however the Jenkins Build job keeps getting failed with Exit 1 state.</p>
  
  <pre><code>date
  echo "SampleBuild job completed successfully."
  </code></pre>
  
  <p>Couldn't able to get the reason for the failure. And the following is what we see in console output.</p>
  
  <p>Started by user Administrator
  Building in workspace C:\ProgramData\Jenkins\workspace\SampleBuildJob
  [SampleBuildJob] $ cmd /c call C:\WINDOWS\TEMP\jenkins6658106255890809140.bat</p>
  
  <pre><code>C:\ProgramData\Jenkins\workspace\SampleBuildJob&gt;date
  The current date is: Fri 02/23/2018 
  Enter the new date: (mm-dd-yy) 
  C:\ProgramData\Jenkins\workspace\SampleBuildJob&gt;echo "SampleBuild job completed successfully." 
  "SampleBuild job completed successfully."
  
  C:\ProgramData\Jenkins\workspace\SampleBuildJob&gt;exit 1 
  Build step 'Execute Windows batch command' marked build as failure
  Finished: FAILURE
  </code></pre>
  
  <p>Can anyone tell me, what am I missing?</p>