How to force the removal of a windows service?

14,011

Solution 1

At the command line:

sc delete "service_name"

Solution 2

You can try to do theses step in a command line:

>NET STOP YouServiceName
>InstallUtil.exe /u YouServiceName.exe
>sc delete YouServiceName

And, if all these doesn't work, try to kill the executable process with Alt+Ctrl+Del.

Solution 3

Try to install the executable again and then remove it.

OR: Delete it in your Registry

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

and restart.

Share:
14,011
Jader Dias
Author by

Jader Dias

Perl, Javascript, C#, Go, Matlab and Python Developer

Updated on June 04, 2022

Comments

  • Jader Dias
    Jader Dias almost 2 years

    I created and installed a .NET Windows Service and now that I deleted its executable file I can't remove it from services.msc anymore with

    InstallUtil.exe /u executablefilename.exe
    

    How do I remove it?

    • Arsen Mkrtchyan
      Arsen Mkrtchyan almost 15 years
      command you type should remove service what error do you get?
    • Arsen Mkrtchyan
      Arsen Mkrtchyan almost 15 years
      do you try to refresh list? if command is executed without errors, you should refresh services list and the service will hide
  • Helen Araya
    Helen Araya over 7 years
    I won't mess with the registry.