Hello,
this topic has been answered in the forum previously, but I have a bit more complexity to it:
* the appication is multiple instance
* we allow upgrades
There must be only one instance of the service installed, no matter how many instances.
My strategy is to do a powershell search to see if there is already a service with given name. It sets AI property to true/false
Then on organization page I use that property to install or not the service based on the condition.
I install 1st instance of the application, it installs the service.
I install 2nd instance of the application, it does not install the service
So far, so good.
I want to do upgrade of the first instance of the application, and it fails. Can't tell why.
I was trying to move the powershell custom action to different position within the sequence, after RemoveExistingProducts, so it would see, that the service is not installed (after upgrade did first uninstall) and in theory should install it. However this installs the service for both instances of the application, so it does not work for initial install (not ugprade) scenario.
Any idea what would be the correct approach ?
Appreciate if you can point me in the right direction.
Thank you.