qwetek
Posts: 1
Joined: Thu Jan 14, 2021 12:43 pm

Loosing service settings on update

Thu Jan 14, 2021 12:51 pm

Hello,
we are using advanced installer msi package to install our software and udpater for updating. The package installs service that is runnign all the time, some users need to change credentials on the service to acces different data locations. When our softwre udpates using the updater, the service is unistalled an installed again with the new version, this causes all additional settings to the windows service to be lost.

Our solution to this was to have instalation of the software and all binaris (including the exe for the service - because it uses shared libraries), but without creating the windows service. Then to have another msi, which would only read path to our installed software from registry and create the windows service. This way updating our software would not unistall the service so no settings woudl be lost. Sadly i cant figure out how to crete MSI which does not install any files, only creates windows service. Is it posible ? When i try create service i must choose exe to run from the package, which there are none.

Of course if you can provide us with another better solution that woudl be great.

Thank you in advance Martin

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Loosing service settings on update

Mon Jan 18, 2021 7:33 pm

Hello Martin and welcome to our forums,

Unfortunately, since I do not own such a service executable as yours, I was not quite able to test this.

However, here are some ideas which you can test on your end and see if everything works as expected:

1. It is indeed true that an upgrade process consists of two steps:

- uninstall process of the older version

- install process of the newer version

Therefore the deletion of your service and its' settings is normal.

If your service binaries (e.g. the executable) are staying the same between different versions of your setup, then you can choose not to delete it during the older version's uninstall process.

In "Services" page, under your service's "Control Operations", you can uncheck the "Delete" option from under the "On Uninstall" section.

This way, your service should not be uninstalled.

2. With your approach, it is not quite possible to use our predefined support for services.

What can be done here, however, is to have a custom action that configures and start your service in the bootstrapper MSI/EXE.

Hope this helps somehow!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”