views:

17785

answers:

4

How do I uninstall a .NET Windows Service, if the service files does not exists anymore?

I installed a .NET Windows Service using InstallUtil. I have now deleteded the files, but forgot to run InstallUtil /u first, but the service is still listed in the Services MMC.

So I guess I have to go into the registry? Or is there a official way?

+8  A: 

From the command prompt, use the Windows "sc.exe" utility. You will run something like this:

sc delete <service-name>
Dean Hill
A: 

Delserv

Schnapple
+50  A: 

You have at least three options. I have presented them in order of usage preference.

Method 1 - use sc tool

Open a Command Prompt and enter

sc delete <service-name>

Tool help snippet follows:

DESCRIPTION:
        SC is a command line program used for communicating with the
        NT Service Controller and services.

delete----------Deletes a service (from the registry).

Method 2 - use delserv

Download and use delserv command line utility. This is a legacy tool developed for Windows 2000. In current Window XP boxes this was superseded by sc described in method 1.

Method 3 - manually delete registry entries

Windows services are registered under the following registry key.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

Search for the sub-key with the service name under referred key and delete it.

smink
A: 

Delete a servive in windows

bhagya