I wrote that back in my Windows XP days, so keep that in mind when looking at my BootImg.bat script. I had it writing the template and temporary config scripts directly to the Program Files folder like a dummy, I should have used the %TEMP% folder instead.
And of course you'll still have to translate, adapt and overcome to get the same sort of thing working on a Mac.
Good luck fellow stranger, let me know how it goes!
Edit: Don't mind the registry file too much, it's not only proprietary to Windows, it also depends on WinImage being installed and also the default program to open IMA/IMG files. But the command itself was solid.