Skip to content

wixl: Make the ServiceControl attributes Remove/Start/Stop optional.

I'd like to be able to install services without having them start immediately.

According to the wix documentation for the ServiceControl element, the attributes Remove, Start and Stop are not required to be present. Not adding an attribute should result in no action being taken for that particular task - e.g. not including a Start attribute should mean that the service is never started during installation or uninstallation.

To do that I've updated the ServiceControl parsing to only call install_mode_to_event() if the corresponding attribute is set. I don't have a good understanding of how the underlying table works (no zero value is defined, but do-nothing values 0x004 and 0x040 are), but my simple testing with a zero value appears to achieve the desired result.

Let me know if that's not appropriate, or if there is a better way to do this.

Merge request reports