It's pretty easy to get the same exe/service to be registry multiple times in the registry under different service entries. This would allow you to run the same code under different account credentials or with different startup parameters. Here's an example of how you'd accomplish this the installer you'd write:
[RunInstallerAttribute(true)] public class ProjectInstaller: Installer { public ProjectInstaller() { ServiceProcessInstaller processInstaller = new ServiceProcessInstaller(); processInstaller.Account = ServiceAccount.LocalSystem; Installers.Add(processInstaller); for( int n = 1; n <= 3; n++ ) { ServiceInstaller serviceInstaller = new ServiceInstaller(); serviceInstaller.StartType = ServiceStartMode.Manual; serviceInstaller.ServiceName = string.Format("A Simple Service (#{0})", n); Installers.Add(serviceInstaller); } } } But to support multiple different configuration files, you'd have to get the same exe installed either under different installation directories, or with different exe file names (so that you could have different config file names or locations). And to accomplish that, I couldn't help you out. The solution doesn't appear to be blatantly obvious after a cursory scan of the docs and relevant IL. The path to the assembly is being picked up automatically as a named item in the Context collection ("assemblypath") and it's not obvious how you'd circumvent that from an installer. However, one alternative would be to put just leverage the multi-service registration while pointing them to the same exe, but configure each service so that a different command line is passed when they're started; where the command line argument would point towards a different configuration file you could parse yourself pretty easily. -Mike http://staff.develop.com/woodring http://www.develop.com/devresources ----- Original Message ----- From: "David McAlister" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 01, 2002 2:53 AM Subject: [DOTNET] OT: Multiple instances of a Win32 Service. > Hi, > > How easy is it to run multiple 'instances' of a (.Net) service - like MS > does with SQL Server 2000 ? > > How is this achieved ? > > We have a .Net service and would like to run it multiple times, each time > using a seperate .config file. > > Thanks > > Dave McAlister > > You can read messages from the DOTNET archive, unsubscribe from DOTNET, or > subscribe to other DevelopMentor lists at http://discuss.develop.com. > You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.