I have a Windows service that create more than one instance of ServiceHost...
I want to be able to manage those ServiceHosts through an external winforms admin tool, so I can open and close each of the ServiceHost from a UI.
What are my options (apart from wrapping each ServiceHost with process)?
You can register one service multiple times with different start parameter and name. Such configuration could be more robust.
sc.exe create Service_1 binPath= "C:\bin\myserv.exe -run=serviceFirst" DisplayName = "Server 1"
sc.exe create Service_2 binPath= "C:\bin\myserv.exe -run=serviceSecond" DisplayName = "Server 2"