Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

How do I uninstall a Windows service if the files do not exist anymore?

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 since deleted the files but forgot to run
InstallUtil /u


first. So the service is still listed in the Services MMC.

Do I have to go into the registry? Or is there a better way?
by

3 Answers

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

sc delete <service-name>
pankajshivnani123
Remove Windows Service via Registry

Its very easy to remove a service from registry if you know the right path. Here is how I did that:

Run Regedit or Regedt32

Go to the registry entry "HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services"

Look for the service that you want delete and delete it. You can look at the keys to know what files the service was using and delete them as well (if necessary).

Delete Windows Service via Command Window

Alternatively, you can also use command prompt and delete a service using following command:

sc delete

You can also create service by using following command

sc create "MorganTechService" binpath= "C:\Program Files\MorganTechSPace\myservice.exe"

Note: You may have to reboot the system to get the list updated in service manager.
kshitijrana14
You can uninstall your windows service by command prompt also just write this piece of command

cd\                                                                   

cd C:\Windows\Microsoft.NET\Framework\v4.0.30319(or version in which you developed your service)

installutil c:\\xxx.exe(physical path of your service) -d

Login / Signup to Answer the Question.