Windows service account and upgrades
Update service without changing its logon details
In my scenario I prefer NOT to use a custom action to delete the service when uninstalling (real uninstall, not uninstalling for upgrade). I thought I had a solution for this by:
- Adding a 2nd Service Control Operation and attaching it to a different component (e.g. with only some dummy file or registry entry) than the 1st Service Control Operation (attached to the component that contains the Service file and "Service to install"-properties).
- Configuring the 2nd Control Operation to stop and delete the service on uninstall.
- Changing the 1st Control Operation to only stop the service on uninstall.
- Configuring the component containing the 2nd Control Operation (In Package Definition > Organization) with the Condition "NOT UPGRADINGPRODUCTCODE"
For testing purposes I added some custom actions right before/after the StopServices/DeleteServices actions in the Install Execution Stage that log and test (i.e. condition is e.g. "UPGRADINGPRODUCTCODE" or "NOT UPGRADINGPRODUCTCODE") for the value of UPGRADINGPRODUCTCODE. Using theses custom actions I see the custom actions get triggered just as I expect.
Can you explain why the condition on the component behaves differently than the conditions in these custom actions?
Regards,
Erik - DDi
FOLLOW US
Get the latest news in Application Packaging