title: Jenkins failed to locate Cygwin
body: <p>I want to run shell scripts with Jenkins on windows with Cygwin but I get this error message. I have my shell program path set to: C:\cygwin64\bin\bash.exe. And my shell command is this: npm install
  ./script/test
  ./script/deploy.</p>
  
  <p>This is my github repository: <a href="https://github.com/y0u-s/test" rel="nofollow">https://github.com/y0u-s/test</a>.</p>
  
  <pre><code>hudson.util.IOException2: Failed to locate Cygwin installation. Is Cygwin installed?
      at hudson.plugins.cygpath.CygpathLauncherDecorator$GetCygpathTask.getCygwinRoot(CygpathLauncherDecorator.java:138)
      at hudson.plugins.cygpath.CygpathLauncherDecorator$GetCygpathTask.call(CygpathLauncherDecorator.java:142)
      at hudson.plugins.cygpath.CygpathLauncherDecorator$GetCygpathTask.call(CygpathLauncherDecorator.java:112)
      at hudson.remoting.LocalChannel.call(LocalChannel.java:45)
      at hudson.plugins.cygpath.CygpathLauncherDecorator$1.getCygpathExe(CygpathLauncherDecorator.java:104)
      at hudson.plugins.cygpath.CygpathLauncherDecorator$1.cygpath(CygpathLauncherDecorator.java:86)
      at hudson.plugins.cygpath.CygpathLauncherDecorator$1.launch(CygpathLauncherDecorator.java:65)
      at hudson.Launcher$ProcStarter.start(Launcher.java:381)
      at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:97)
      at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
      at hudson.model.Build$BuildExecution.build(Build.java:199)
      at hudson.model.Build$BuildExecution.doRun(Build.java:160)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:533)
      at hudson.model.Run.execute(Run.java:1759)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:89)
      at hudson.model.Executor.run(Executor.java:240)
  Caused by: hudson.util.jna.JnaException: Win32 error: 2 - The system cannot find the file specified
      at hudson.util.jna.RegistryKey.check(RegistryKey.java:124)
      at hudson.util.jna.RegistryKey.open(RegistryKey.java:223)
      at hudson.util.jna.RegistryKey.openReadonly(RegistryKey.java:218)
      at hudson.plugins.cygpath.CygpathLauncherDecorator$GetCygpathTask.getCygwinRoot(CygpathLauncherDecorator.java:127)
      ... 18 more
  </code></pre>
  
  <p>I am kinda stuck right now, what should I do?</p>
  
  <p>Thanks</p>