You should check out boot_service.py in the py2exe distribution. You should
clone that file, and implement whatever semantics you like. You'll then
probably need to dig into build_exe.py to work out how to arrange for a
custom boot script - you would then specify your modified version.
I went down that path, and it worked out beautifully. At least the customizing of boot scripts and monkey-patching build_exe. The design of build_exe is great to patch in, big WOWs to Thomas and all who did jobs.
HOWever, I learned (guess you know that, I just want to put this knowledge somewhere googleable):
a) the "custom_boot_script" option of py2exe only adds an ADDITIONAL boot_script, not a replacement. So if something happens in boot_service.py that someone not likes, it will not be undone by custom_boot_script; but by overloading get_boot_script()
b) using pywin32 command style for the service works much more harmonic and beautifull.
I recommend to have pywin32 command style for services as default for the next py2exe version
> An alternative would be to see if you can make a "custom" command-line arg scheme work for you - boot_service.py should >give you enough pointers there too.
>I hope that helps - let us know if you get stuck.