Two branches here don't seem necessary, since Windows should be able to append .bat itself.