I'm working on an installer that is supposed to install several Windows services. We make new builds (with new .msi files) pretty often, and we use major upgrades to make it easy to install over a previous installation.
The problem is that we need to update the service files without overwriting the service configuration (account username and password, for instance).
We're using ServiceInstall
and ServiceControl
inside the component that holds the service exe
file. Is there a way to make the execution of ServiceInstall
conditional (using a condition like REMOVE="ALL" AND NOT UPGRADINGPRODUCTCODE
) so the service is not uninstalled when upgrading (just stopped so we can upgrade the files)?
One solution would be to use custom actions, but maybe there is a better way?
Thanks!