bjk68
Posts: 55
Joined: Tue Dec 01, 2009 12:45 pm

Service as part of a feature fails if feature not selected

There is no "Execution Condition" at the "Services to Install" / "Service Properties" page of AI. My service-executable is part of a feature. When the end-user chooses not to install this feature, the service should not be installed. The AI installer always tries to install the service, even if the feature containing the service-executable is not selected. The installation fails in that case.

Please can you add an "Execution Condition" to the "Service Properties". Or maybe you have a workaround for this issue?

Maybe AI can detect automatically in which feature the service-executable is present, and only install the service, if the feature is selected to be installed.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Service as part of a feature fails if feature not selected

Hi,

Services configured in the "Services" page should be installed only if their EXEs are copied on the target machine. Basically, they are conditioned indirectly by the EXE file. If the EXE is not installed, the service shouldn't be installed either.

If this doesn't happen for your package, can you please send us the .AIP (project) file you are using to support at advancedinstaller dot com so we can investigate it? Also, please attach a verbose log of the installation process.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bjk68
Posts: 55
Joined: Tue Dec 01, 2009 12:45 pm

Re: Service as part of a feature fails if feature not selected

Hi Cosmin,

I rewrote my aip (project) to use ".Net Installer Class Action" Custom Actions with Execution Conditions for the Feature. And now it all seems to work fine, although I am in doubt if I used the correct Execution Conditions (see my other post today about this).

I will rewrite the aip using the Services again and send it to you. We use .Net services. I read in this forum that both solutions should work (AI "Services" and ".Net Installer Class Action" Custom Actions). Can you tell me something about the difference between these two solutions for installing .Net services.

Regards,
Bart
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Service as part of a feature fails if feature not selected

Hi,
Can you tell me something about the difference between these two solutions for installing .Net services.
By using the "Services" page the services are installed automatically by Windows Installer. Note that only native Windows services are supported. This is the recommended approach.
When the "Services" page cannot be used (for example Windows Installer doesn't support the service), a solution is to use a custom action. This is usually an alternative approach.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”