views:

1359

answers:

9

I have a couple old services that I want to completely uninstall. How can I do this?

A: 

this has nothing to do with programming. . .

Bob Dizzle
System administration questions are Ok. Programmers constantly deal with these kinds of issues.
Eric Z Beard
Not specifically the question, but whoever does a lot of windows programming will find the answer useful. I for one need to do those a lot when debugging / testing my COM+ app.
Mostlyharmless
+1  A: 

Click Start | Run and type regedit in the Open: line. Click OK.

Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

Scroll down the left pane, locate the service name, right click it and select Delete.

Reboot the system

Mark Schill
A: 

Remove the right key from HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\

Lars Truijens
+16  A: 

Use the SC command, like this (you need to be on a command prompt to execute the commands in this post):

SC STOP shortservicename
SC DELETE shortservicename

If you need to find the short service name of a service, use the following command to get a list of services and their status:

SC QUERY

For a more concise list, execute this command:

SC QUERY | FIND "_NAME"

The short service name will be listed just above the display name, like this:

SERVICE_NAME: SSDPSRV
DISPLAY_NAME: SSDP Discovery Service

And thus to delete that service (it is not recommended to delete the SSDPSRV service btw):

SC STOP SSDPSRV
SC DELETE SSDPSRV
Lasse V. Karlsen
Why do you not recommend that?
sgwill
Deleting the SSDP Discovery Service? It is used for detecting and configuring UPnP devices on the local network, you should not delete it. It was just used as an example.
Lasse V. Karlsen
Oooh, I see, yes. I thought you meant deleting services wasn't recommended. Thanks for the answer!
sgwill
A: 

sc delete name

Mariano
+1  A: 

Use services.msc or (Start > Control Panel > Administrative Tools > Services) to find the service in question. Double-click to see the service name and the path to the executable.

Check the exe version information for a clue as to the owner of the service, and use Add/Remove programs to do a clean uninstall if possible.

Failing that, from the command prompt:

sc stop servicexyz
sc delete servicexyz

No restart should be required.

asquithea
A: 

Here is a vbs script that was passed down to me:

Set servicelist= GetObject("winmgmts:").InstancesOf ("Win32_Service")

for each service in servicelist

sname=lcase(service.name)

If sname = "NameOfMyService" Then

    msgbox(sname)
    service.delete ' the internal name of your service

end if

next

Lucas
A: 

If they are .NET created services you can use the installutil.exe with the /u switch its in the .net framework folder like C:\Windows\Microsoft.NET\Framework64\v2.0.50727

UndertheFold