I have written a windows service and have created a setup project to install it. I also add custom action for select service name during a setup process. It works fine if install only one instance of the service. However, in some deployments, we will need to install multiple instances of the service with different configuration. if I try to install another copy of the service with one already installed, it thinks I want to repair or remove the previous copy.
Can the setup project be made to accommodate installing multiple instances of an application ?
Your comments indicate that you are trying to install multiple instances of a product from a single .msi by specifying different parameters to msiexec. This will not work. As you have discovered, Windows Installer regards your .msi as being a single product and won’t allow it to be installed multiple times.
What you need to do is to get your .msi to install all the different service instances at once. You’ll need to specify all the different configuration options for each service in the call to msiexec, and effectively loop inside your installer.