Reputation: 481
I'm trying to run custom action before starting service only.
Now I'm doing this way.
<Custom Action="Parameter7" Before="Action7">LANGUAGE = "United States - English"</Custom>
<Custom Action="Action7" Before="StartServices" >LANGUAGE = "United States - English"</Custom>
and I have this code for starting service
<Component Id="START_SERVICE" Guid="13A5B40E-569D-49f5-A0DD-FDE659DAB11B">
<ServiceControl Id="StartService" Start="install" Stop="both" Name="LRSAS" Wait="yes" />
</Component>
I would like to see the result that 'Action7' runs before only starting service (only when installing) but it seems this Action 7 run when uninstalling as well.
Any idea for this ?
Upvotes: 0
Views: 1621
Reputation: 11
Technically ServiceControl is tied to the Component and only gets run when the Component is set it be installed. If you want to be completely accurate your condition should also check the action state of the Component as well.
NOT Installed AND $START_SERVICE>2 AND LANGUAGE = "United States - English"
Upvotes: 1
Reputation: 481
Okay, I have to change my code into this. :)
<Custom Action="Parameter7" Before="Action7">NOT Installed AND LANGUAGE = "United States - English"</Custom>
<Custom Action="Action7" Before="StartServices">NOT Installed AND LANGUAGE = "United States - English"</Custom>
Upvotes: 1