Hi,
I don't see how a conditional variable used with the Organisation of the features solves this problem...because the service details seem to be tied to the feature that installs the EXE?
An installation package is organized into
Components and
Features. The installation of a component can be conditioned directly with a property, however this is not always true for features. By conditioning a component, the component will not be installed by Windows Installer if the condition is not met.
I'm afraid that you cannot partially update a service. When a patch is applied, Windows Installer triggers a repair of the target package and the service settings are restored to the original values. After this step, the patch evaluates the differences between the installed package and the resources it contains and updates the old installation.
If you want to update the service and still keep some of its settings, the only solution is to use a
custom action. This custom action can have two functions:
- the first function memorizes the service settings before the patch is applied
- the second function replaces the settings made by the patch with the one memorized before the patch was applied
I still want repair to create the service in the registry if it has got "lost", overriding the functionality as above.
Please note that the settings of the service are written inside the MSI file, not in the registry. When the MSI package is installed the service will be created and configured based on the tables inside the MSI. Therefore, what you need can be done only through a custom action conditioned to run only during repair.
Regards,
Cosmin