Thursday, February 12, 2009

Installing Multiple Instances of Windows Service

To Installing Multiple Instances of Windows Service.

  • Install InstallUtil.exe.
  • Add a /name parameter to specify what the service will be named. The names have to be unique, so if you already have "Telligent Mail Gateway", you might need to name it "Telligent Mail Gateway - Site 2".
  • Specify the filename of the Windows Service, which is usually like "....Service.exe”. With Mail Gateway.

    it would be like this:
    InstallUtil /name="Telligent Mail Gateway - Site 2" Service.Service.exe

    Run this from a command prompt within the add-ons directory. The name must be in quotes if it contains spaces and must come before the filename.
How to Uninstall:

Uninstalling the service is very similiar to installing. You will still use the InstallUtil.exe program and will need to specify the name of the service to uninstall, though this time you will need to add a /u switch to specify that you intend to uninstall it. For instance:

InstallUtil /u /name="Telligent Mail Gateway - Site 2" Service.Service.exe

The name must be specified since if you have multiple instances of the same executable installed, it will need to know which one. If no name is specified, it will remove the one with the default name as opposed to a custom named one.

Again, the uninstall and name parameters must come before the filename so that it know they are for that file.