DariuszScharsig
Posts: 4
Joined: Mon Jul 05, 2010 1:41 pm

Deleting Services Conditionally

Greetings dear AI team and community.

I have a question about installing, or to be more precise, deleting installed services.

We have an application that installs side by side with older major versions. The newest one installs a set of services like a data base and a licensing server etc.

Now, if the user "repairs" an older installed version it will replace the new services with its own. This is of course expected yet undesired. I know I can conditionally install and unsinstall services by defining a component condition which would leave me with the problem that I'd be missing the service executables.

I could try installing dummy file component which trigger the service control operations or the components "Shared among packages" option, which I will evalueate now.

If you guys have any experience regarding this matter or different suggestions I'd be glad to try them out.

Kind regards
Dariusz Scharsig
Parit Software GmbH
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Deleting Services Conditionally

Hi Dariusz,

In order to achieve your desired scenario your older application version should contain its services in a separate feature. Then your newer application version should be configured like this:
- From "Upgrades" page enable the "Automatically upgrade the older product versions" option, and then enable the "Customize Advanced Installer upgrades rules".
- From "Upgrades" group select the "AI_NEWERPRODUCTFOUND" property row, and then click on "Edit..." button.
- In the new dialog from "Upgrade Action" tab choose in the "Upgrade features" field your services feature.
This scenario should be used when the older version can be integrated with the newer services. If you already have the older version installed on the target machine, then you could use this scenario for the upcoming version of your application. In this case you should use different names for your services (i.e. you can include the product version number in the services name).

If you have any questions let me know.

Regards,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”