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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:51:31+00:00 2026-06-06T08:51:31+00:00

Upon installation of a Windows Service, an application is using a custom action to

  • 0

Upon installation of a Windows Service, an application is using a custom action to set the ServiceName and DisplayName of that service according to whatever the user enters into an install dialog text box.

In testing this application it works fine for installation but when I try to uninstall the service I get an Error 1001. Service does not exist.

enter image description here

which is ultimately not true because I can run it. So my present thinking is that i need to somehow access the custom name of the service and feed that to the uninstaller. I would have thought this was all GUID based and that the name would become largely irrelevant re: uninstall but it would seem not to be the case.

So how to do I resolve this problem?

  • 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-06T08:51:34+00:00Added an answer on June 6, 2026 at 8:51 am

    I will assume that your are using an Installer derived class together with a ServiceInstaller instance.

    I do something similar in a project. The service name is stored inside a text file (this is just an option, but for me it’s there for automatic deployment purposes). You can store it anywhere (registry, etc).

    So you should persist somewhere the custom service name configured during the install phase.

    So, I have my Installer class:

    [RunInstaller(true)]
    public partial class ProjectInstaller : System.Configuration.Install.Installer
    

    And in it’s constructor, I do:

    _process = new ServiceProcessInstaller { Account = ServiceAccount.LocalSystem };
    _service = new ServiceInstaller { ServiceName = ServiceNameReader.GetServiceName(), StartType = ServiceStartMode.Automatic };
    Installers.Add(_process);
    Installers.Add(_service);
    

    Notice the ServiceNameReader.GetServiceName() function. This custom function gets the service name from the file.
    The Installer class is instantiated and called during uninstallation too. So if you do something like this, to load the actual service name dynamically from somewhere, you will be able to uninstall it successfully.

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

Sidebar

Related Questions

Increasingly I found myself using tools based upon python, particularly that use installation processes
I have a web service project that needs to be set to use Integrated
I have a Core Data based application that stores hierarchal data displayed using a
I'm using c#, .net 4, WIX 3.5, Windows Vista. I have made my application
At the moment I have a windows service written in C# that waits for
-How can I check for a new version of my application upon installation? I
I need to create an installation file for Windows in such a way that
Upon reviewing a bunch of MVC style web applications, I'm noticing that it's common
Upon submitting this form on my site. It send me to a page that
Upon loading into a C++ program a Prolog program that contains the command 'send'

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.