开发者

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 开发者_如何学Gothe other one is not. So after install I have to manually type installutil /i MyServiceB. How do I correct this?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜