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 8082519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:07:54+00:00 2026-06-05T17:07:54+00:00

I have a service which is running in a system in several instances. I

  • 0

I have a service which is running in a system in several instances. I need to find DISPLAY_NAME of the service from the service. I’ve tried ServiceBase.ServiceName but it returns (probably) the name of service from the project installer, which is at least in this case useless.

The service is installed by installutil with a parameter /name=.

Edit

I have a workaround based on Imran Balouch answer. I read the name in the installer Me.Context.Parameters("name") and write it to ImagePath registry subkey and read it with Environment.GetCommandLineArgs in a service.

  • 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-06-05T17:07:56+00:00Added an answer on June 5, 2026 at 5:07 pm

    Have you added ProjectInstaller in your windows service project? If yes than in ProjectInstaller you add ServiceInstaller for your service, and in that ServiceInstaller you can specify the display name of the service. Select that serviceinstaller and in properties set its Display Name or in InitializeComponent of ProjectInstaller.Designer.cs or ProjectInstaller.Designer.vb you can specify the display name as:

    this.yourServiceInstaller.DisplayName = "Service Display Name";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a windows service running as local system, which will search for some
have a problem with a system. I have running service, which is constantly checking
I have a web service which is running fine when i call it from
I have a WCF service which works on my dev machine running IIS 7,
I have a WCF service running on my machine, which get lauched while I
I have a static dictionary which holds authentications for a web service. I'm running
I have a windows service which is trying to access an xml file from
I have several background tasks running on my Glassfish server implemented by @TimerService instances.
I have an existing DataSnap server (Windows service) which is running fine on HTTP,
I have a windows service application, running under WinXPe, which sometimes fails with an

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.