A picky point, no solution (you are very unlikely to get a windows solution from me !).
May be its a terminology issue but I am struggling to make sense of your report. Firstly, lets get this clear. You start with some source code, FPC complies that into an executable (Lazarus asks FPC to do it) and then Lazarus runs your program for you.
So, by my reckoning, your fix of a cmd file instead of fpc would make no difference when running the program (fpc is not, then, involved) but would possibly make a difference when compiling.
Now, if what you appear to be saying is literally true, your fix is somehow building a different binary at compile time, one that will run on your system. Thats an important clue to what is happening.
I hope you don't think I am being awkward here, its just that what you seem to be describing is unlikely but, never the less, possible.
Could you clarify please ?
Maybe compile (ie "build", or even "clean up and rebuild") in both modes, with and without your fix, and see if the two binaries are different ?
Davo