diff --git a/src/main/java/hudson/plugins/groovy/Groovy.java b/src/main/java/hudson/plugins/groovy/Groovy.java
index <HASH>..<HASH> 100644
--- a/src/main/java/hudson/plugins/groovy/Groovy.java
+++ b/src/main/java/hudson/plugins/groovy/Groovy.java
@@ -233,7 +233,7 @@ public class Groovy extends Builder {
 
         private File getExeFile(String execName) {
             if (File.separatorChar == '\\') {
-                execName += ".bat";
+                execName += ".exe";
             }
             return new File(getHome(), "bin/" + execName);
         }
Using .exe instead of .bat because of its incorrect handling of return codes (thanks to Scott Armit for pointing this out).