You're getting a lot of repeats of this boilerplate; I'm compelled to wonder whether there's a way to save most of the repetition, e.g. by having a body in default.cf.sub that takes parameters, ignoring three of them on windows, and uses them to automate the rest.  I guess @tzz would be the expert to know how to do that, if possible.