Ok I found the problem.
Calling VCVARSALL.BAT (which the auto generated bat file does before calling nmake to launch development prompt) changes the current working directory as of VS2017.
To Fix the bat script needs
to predefine the working directory. This should be in the model.bat file that gets generated when building but it isn't.