Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 435489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T20:22:52+00:00 2026-05-12T20:22:52+00:00

My question is essentially the same as the following one but the answer did

  • 0

My question is essentially the same as the following one but the answer did not help me.

.NET Windows Service – multiple services in one project

Essentially, I have 3 services, lets say “Service1”, “Service” and “Service3”.

ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
                                {
                                    new Service1("Service1"),
                                    new Service2("Service2"),
                                    new Service3("Service3")
                                };

ServiceBase.Run(ServicesToRun);

I also have installer classes with corresponding
serviceInstaller.ServiceName = “ServiceX” for each of these services.

When I use installutil, i do see all 3 services on the Service manager. However, when i start them (any or all of them) only the first one (“Service1”) is running.

I know this is trivial and i can probably have different installer projects for each of these but in my case, it semantically makes more sense to use just one

Your help is appreciated

Thanks
Venu

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T20:22:53+00:00Added an answer on May 12, 2026 at 8:22 pm

    I created a 3 service project (below) which uses a project installer for each service. I then added an installer project which installs the services into service manager. Here was my workflow:

    1. Create 3 services in a solution in Visual Studio 2008. Naming each service as Service1, Service2 and, Service3. (Being sure to change the actual service names to their respective names in the properties window.)
    2. Added an Installer project to this solution.
    3. Added the project outputs from the three service projects to the installer project.
    4. Added custom actions for all three services in the installer for Installing the services in service manager.
    5. Built and Installed.

    This gives me three distinct services in service manager: Service1, Service2 and Service3

    Enjoy!

    http://code.google.com/p/multi-service-install/

    EDIT:

    I have updated the code in the repository to have one executable but two services. Each service installs to the service manager with its own name and ability to start/stop. I think this is what you’re wanting, correct? Here is what I did:

    1. Created a service project.
    2. Added a second service to the same project (with a unique service name).
    3. Added an installer to both services (ServiceA and ServiceB).
    4. In the ProjectInstaller.Designer.vb file I changed the Me.Installers.AddRange line to show both of the service installers. (Me.ServiceInstaller1, Me.ServiceInstaller2)
    5. In the Main entry point of the main service (ServiceA in my case), I set the ServicesToRun variable to an array of ServiceBase containing all the services that I want it to run (ServiceA and ServiceB). This is an important step as the service manager sets a property based on the number of arguments here – either to allow multiple instances of the same exe or only a single instance.
    6. Add an installer project and use the output of Services.
    7. Add a custom action using the output from Services.

    The code can still be downloaded from the same link as above.

    Thanks!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My question is essentially the same as this one: Polymorphic Association with multiple associations
My question is essentially the same as this one here . I'm using AnkhSVN
Basically, the question is - are the following essentially the same? NSString *value1 =
My question is essentially the same as question 765054 on StackOverflow. I'm only asking
My question is essentially a simple one, though I'm looking for as in-depth an
Essentially, the question is in the title. I have a ASP.NET MVC application, and
This seems like a basic question, but I haven't found any clear answers. Essentially,
I have tried again to ask the same question , but I ended up
I know in concept, or reality even they are essentially one in the same.
This questions involves 2 different implementations of essentially the same code. First, using delegate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.