My emacs.bat rest in the same bin directory as emacs.exe. This directory is included in the PATH variable (Windows).
Content of emacs.bat:
@echo off "%~dp0emacsclientw.exe" -na "%~dp0runemacs.exe" "%1"
However, whenever I use this command, emacs.exe gets executed instead of the .bat file. How would I go about fixing this?
It seems you could put the emacs.bat in another directory and place that directory earlier in the PATH. Note: if you were to run “emacs” while in the directory containing emacs.exe then the .exe would take precedence.
Edit: Alternatively, you could just typeemacs.batinstead ofemacsat the command prompt.Edit 2: As seen in this Answer, you could set the
PATHEXTenvironment variable. Something along the lines of:PATHEXT=.BAT;.COM;.EXE;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.RB;.RBW