Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Service already exists (when it clearly doesn't)

Tags:

I'm trying to create an installer for a Windows Service I developed. This installer has a custom UI at one point and it's the first time I do something like that so I installed and uninstalled the service a few times to make sure everything was like I wanted to in the installer.

Now my issue is that when I try to install the service, it fails with Error 1001: Specified service already exists, but the service is listed nowhere in the registry, the services.msc console, or by sc query.

Can anyone give me a clue of what's happening and how to fix it? Thank you

Edit: Thanks for your replies. I re-opened the management console and restarted the computer and am still getting the error. Changing the ProductCode and UpgradeCode did not fix the issue either. There's also absolutely no reference to the service in the registry.

like image 841
anthonyvd Avatar asked Apr 08 '11 18:04

anthonyvd


1 Answers

Run in command line (adm mode):

sc delete service_name 

Service names with spaces must be quoted.

Update: Try this:

sc query type= service > services.txt 

and verify that the service does not appear with another name.

like image 152
lsalamon Avatar answered Oct 19 '22 12:10

lsalamon