title: Jenkins - cmd is not recognized
body: <p>Environment:</p>
  
  <ul>
  <li>Master Linux Jenkins server  </li>
  <li>Two Windows slave nodes  </li>
  <li>The windows slaves are running as a service  </li>
  </ul>
  
  <p>First Test</p>
  
  <ul>
  <li>I create a Pipeline and use a use a "Execute Windows batch command" in the build section  </li>
  <li>In the Command box I put "C:\Jenkins\mytest.bat"  </li>
  <li>I checked the box "Restrict where this project can be run" and write down the name of the Windows slave  </li>
  <li>I built the pipeline and was <strong>successful</strong>  </li>
  </ul>
  
  <p>Second Test</p>
  
  <ul>
  <li><p>I create a Declarative Pipeline as follows:  </p>
  
  <pre><code>pipeline {  
      agent { label 'SiebelWindows' }
  
      stages {
          stage('Test Bat') {
             steps { 
                          bat 'C:\\Jenkins\\mytest.bat'
                          //bat 'start cmd.exe /c C:\\Jenkins\\mytest.bat'
                          //call C:\\Jenkins\\mytest.bat
                          }
                  }
      }
     }
  </code></pre></li>
  <li><p>In this case the build <strong>FAIL</strong> with error "cmd is not recognized as a internal o external command"  </p></li>
  </ul>
  
  <p>So, why can I run the .bat with a non-declarative pipeline, but fails with a declarative pipeline?</p>