title: Jenkins windows slave auto reconnection
body: <p>Hi can anyone help me on the below issue..</p>
  <p>i tried connecting my windows slave in cmd with this command and it was able to connect.</p>
  <p>&quot;java -jar agent.jar -jnlpUrl jenkins-agent.jnlp -secret  -workDir &quot;C:\jenkins&quot;</p>
  <p>but if i try running it through batch file in order to avoid manual connection each time i restart the system it was not able to connect. below is the error</p>
  <p>Failed to obtain http://<em><strong><strong><strong><strong><strong>/computer/windows0slave0node/jenkins-agent.jnlp?encrypt=true
  java.io.IOException Failed to load http://</strong></strong></strong></strong></strong></em>*/computer/windows0slave0node/jenkins-agent.jnlp?encrypt=true: 404 Not Found</p>
  <p>Waiting 10 seconds before retry</p>
  <p>my requirement is whenever i reboot my ec2 instance slave machine must be automatically connected with master without connecting it remotely</p>
  <p>am using windows ec2 instance. please help on this</p>