Kasper Hansen
Kasper Hansen

Reputation: 6557

How do I install 2 different windows services with 1 setup project?

I have 2 different windows services that should be installed by a single setup project. The project output from both of them goes into the same directory which is fine. There is a project installer and a service installer added under each of their respective projects. But for some reason it is only one of the services that are installed (similar to installutil /i MyServiceA), but the other one is not. So after install I have to manually type installutil /i MyServiceB. How do I correct this?

Upvotes: 2

Views: 857

Answers (1)

Grant Thomas
Grant Thomas

Reputation: 45068

You only need a single project installer class which will contain your service and process installers of both both / all services.

For example

MyProjectInstaller
    -> MyFirstServiceInstaller
    -> MyFirstServiceProcessInstaller
    -> MySecondServiceInstaller
    -> MySecondServiceProcessInstaller

However, each class with the RunInstaller(true) attribute should technically be executed regardless of having neighbours, or not; to this end, maybe someone has a more direct approach to your problem.

Upvotes: 1

Related Questions