The services are started by the "StartServices" standard action that belongs to the "Add Resources" action group from the "Custom Actions" page (you can see it if you right-click on that group and select the "Show Standard Action" option).
You can set that standard action not to be executed anymore, however setting it to be executed earlier or later is not quite possible. Can you tell me why do you need this, so I can think of a better solution?
In order for your custom action to be executed before the service is started, you can select the "Move" button that is displayed at the right of it, then place it after the "Add Resources -> InstallFiles" standard action.
(Strictly speaking, my question was simplifying. We had to move two custom actions there, and we moved it after "Write Registry" because our service also relies on registry values. But it worked exacly the way you told me.)
I like to suggest improving the UI here. I've never been aware the "Add Resources" standard action has finer granularity.
That's visible only when moving an action around. Finally, the custom action still appears below "Add Resources" in the Install Execution stage, althought it is scheduled somewhere inside "Add Resources".
FOLLOW US
Get the latest news in Application Packaging