I was writing a test Windows Service and accidentally removed it through the Programs and Features dialog, which removes the files, but doesn't actually remove the service from the service list. So when I tried to install the 2nd version of this test service it was complaining that it already existed.
I looked around a little and found that I could delete the Service from the registry in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\[Your service]. I deleted the key (the little folder thingy) and it did show some change, but my service was still there and the newer version still wouldn't install.
After a little more looking around I found out that to fix it I could use sc delete [YourService] to fix it. And it did!
Next time, though, I really should use the installer I used to install it to remove it...
Subscribe to:
Post Comments (Atom)

Hey Dude,
ReplyDeleteThis realy helped me saving my problemn.
Great blog,
H. Sals
Hey man, just saved me a lot of work, thanks so much :-)
ReplyDeleteThanks a lot dude. this helped me as well
ReplyDeleteWOOT! First hit on Google, solved my problem.
ReplyDeleteLegend!
ReplyDeleteWow
ReplyDeleteSame here, never heard of that command, but it worked great!
ReplyDeleteThank you, this is very useful!
ReplyDeleteThanks! Helped me too :)
ReplyDeleteYou’ll need to open up a command prompt, and if you are using Windows 7 or Vista you’ll need to right-click the command prompt and choose Run as Administrator. We’ll use the sc command to actually do the work.
ReplyDeleteThe syntax used to delete a service is this:
sc delete ServiceName
If your service name has spaces in it, you’ll need to wrap the service name in quotes, like this:
sc delete “Adobe LM Service”
Thanks. Works on Win 2008 too.
ReplyDeletethanks man, that really solved my problem and had no problem finding the solution.
ReplyDeleteFirst link on google and job done.
Thanks.. Saved my time.. :)
ReplyDeleteThis is terrific.
ReplyDeleteBut, the program I have installs as two services and while the command deleted the first service, the second one won't budge (I tried the double quotes).
Pretty cool, my service stuck in there for a while because some bug in the code. Now I find the resolution. Thanks very much
ReplyDeleteDuring onee oof these hook-ups Pardo believes Khloe
ReplyDeleteKardashian was conceived. The Mahala by Jimjmy Choo is quite
classy, and every bit as desxigner as the shoe line.
In an analog multimeter, the range has to be adjusted by the user.
Here is my web site :: the simpsons tapped out cheats