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

  • Home
  • SEARCH
  • 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 8264333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T04:25:08+00:00 2026-06-08T04:25:08+00:00

Hi i have prepared a windows service which setup on server by batch file

  • 0

Hi i have prepared a windows service which setup on server by batch file (.bat file). Also i can remove it from system completely after running Uninstall.bat There is no myservice on Services.Every thing is look good.

after clicking Setup.exe , error message appears: Error 1001 The specified service already exists:

How to remove old windows service from my os completely. Or how to solve this setup problem. My uninstall.bat exe working good.

  • 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-08T04:25:09+00:00Added an answer on June 8, 2026 at 4:25 am

    My guess based on the description is that the service (or rather the registry key) exists indeed. You will not be able to work around this without manually intervening. What seems to happen is that you indeed remove the service, but seemingly don’t stop it (or it can’t be stopped).

    When a service is still running when it gets removed from the SCM database, the service key will be marked for deletion internally plus there will be an additional value in the key telling the system to remove the key upon boot. The idea is that if the system gets shut down normally, the internal linked list of services to delete will be used to remove the service key and that will be done before the system restarts. If, however, the system crashes the key will be removed upon boot and before the SCM starts to bring up the services.

    The internal linked list is likely what causes the trouble for you here. Because when you go through the SCM APIs that is what gets done. One way to work around this (and I have done this in the past) is to rename the key in the registry at a strategically good point in time and set it to be removed upon boot instead of using the SCM APIs.


    Side note: inside an MSI you should always use the ServiceInstall/ServiceControl and Registry tables instead of using code (be it a batch file or your custom action). These actions already exist and merely need to be sequenced.

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

Sidebar

Related Questions

I have prepared one sample application.When application install in devices download the file from
Can I have a prepared statement with the following query: select * from table
I have a Java server process that I normally run in either Windows batch
In my application i need to open pdf file.For that i have prepared code
I have wxPython app which is running on MS Windows and I'd like it
I have a ListActivity which shows list of items. I prepared another layout for
We have taken over some .NET 1.1 Windows Service code that spawns threads to
I have prepared few queries using startwith and connectby for fetching all items of
I have prepared a r script and trying to apply the same codes in
We are playing around with Atlassian products and I have prepared an agile sprint

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.