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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T14:08:12+00:00 2026-05-21T14:08:12+00:00

We have many questions on stackoverflow regarding uninstallation of Windows Service. After trying all

  • 0

We have many questions on stackoverflow regarding uninstallation of Windows Service.
After trying all of them I still fail to uninstall the windows service on new version Installation.

I use setup and deployment project to install/uninstall my project which has a windows service and some other projects.

During installation of newer version, all other projects are successfully re-installed but windows service project fails to Re-install and says:

Error 1001: The specified service already exists.

I referred this link and tried to add code to my Install custom action to Stop the service. If I understood the answer in this link correctly, I have put the code to stop the service inside projectInstaller.cs file of the Service:

public override void Install(IDictionary stateSaver)
{ 
      ServiceController sc = new ServiceController("SareeManagerNotifications");
      if (sc.Status == ServiceControllerStatus.Running)
          sc.Stop();
     base.Install(stateSaver);
}

Custom action pane looks like:
enter image description here

Where the highlighted part is the Service.

I also went through this answer which says to set custom action condition as
NOT PREVIOUSVERSIONSINSTALLED.

enter image description here

This doesn’t work for me. Where am I going wrong ?

Thanks in advance 🙂

  • 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-21T14:08:13+00:00Added an answer on May 21, 2026 at 2:08 pm

    Try the following steps while editing the windows service:

    1. Right click your SetupProject from visual studio and select custom actions from view.

    2. You will find 4 custom actions install,commit,rollback and uninstall. Right click on each of these actions one after the other and add a custom action

    3. After doing so you will find a select item in project window. In the window select Application folder from look in dropdown. This will list the primary output from windows service, select this and click ok.

    4. Save and build the setup project.

    Hope this will solve your issue….

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

Sidebar

Related Questions

I've searched StackOverflow and there are many ConcurrentModificationException questions. After reading them, I'm still
I have already checked many questions in StackOverflow but none of them worked for
I have read many questions about Android, J2ME and RecordStore , but I still
First you should know I have looked into many questions and none of them
I have seen many articles and Questions/Answers Regarding Lock Escalation but following things are
I have a several questions about hibernate. In many questions here in stackoverflow, several
I have read many questions in stackoverflow, related to python compare directory. However, my
We have all seen many question on StackOverflow that are founded upon the idea
My question is in relation this this answer. https://stackoverflow.com/a/8773953/1297775 I have read at many
I have checked many questions here but none has my answer. I appreciate if

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.