Windows service installation optionally - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

ebuki
Posts: 13
Joined: Wed Aug 26, 2009 10:26 pm

Windows service installation optionally

Dear Support,

I'm wondering how do I install a predefined Windows service optionally, e.g. with a GUI checkbox.
I tried to set it up but I could not find any property for this.

Thank you, Edvard
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Windows service installation optionally

Hello,

In an .msi based installer, a service is usually part of a component. Conditionally installing that component will mean conditionally installing the service.
For your purpose, you will assign a property to your checkbox, and conditionally install the component containing the service depending on the value of that property:
- add the service to your Files and Folders page
- add a new service from the Services page
- on the Dialogs page, add your checkbox in an appropriate place
- make sure the checkbox item is selected, and set a "Property Name" for it, let's say INSTALLSERVICE
- from the same pane, fill in the Value field with "Yes" without quotes
- on the Files and Folders page, right click your service executable and select "Go to Component"
- you are now on the Organizaton page, with the component containing your service selected
- in the right pane, select "..." to the right of the "Condition" pane and place a condition like this:

Code: Select all

INSTALLSERVICE = "Yes"
This should enable you to conditionally install a service.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
ebuki
Posts: 13
Joined: Wed Aug 26, 2009 10:26 pm

Re: Windows service installation optionally

Thank you Gabriel, I'm going to do that based on your suggestions.
Edvard
ebuki
Posts: 13
Joined: Wed Aug 26, 2009 10:26 pm

Re: Windows service installation optionally

Hi,
I tried the suggested way and it worked fine, but I have a problem with this. I need the component which would be a service optionally. In this way the component is missing from the installed stuff.
Regards, Edvard

Return to “Common Problems”