Removing a service manually in Windows Server 2008

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…

Advertisements

One response to “Removing a service manually in Windows Server 2008

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s