MGS
Posts: 128
Joined: Tue Oct 04, 2022 9:52 am

Start Service depending on Checkbox

Hi,

I have the necessity to let the user decide during installation (using a Checkbox) whether a service should be started at the end of the installation or not. Currently it always starts. Under "Services" - "Control Operations" - I select the entry belonging to the service and there I can select which actions happen "On Install". There are no conditions here though, thus it's not directly possible it seems. How can I achieve this?

Best regards,
Johannes
Liviu
Posts: 1325
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Start Service depending on Checkbox

Hello Johannes,

Each service has a related .exe file in the "Files and Folders" page. Also, that .exe file has a related component in the "Organization" page.

So, in order to set a condition for a service, you need to set a condition for the component related to its .exe file (as exampled in the image below):
service.png
service.png (36.75 KiB) Viewed 7164 times

However, this will decide whether the service is installed or not.

If you want to always install it and to turn it on based on a condition, I'm afraid you will have to accomplish this through a custom action.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”