Jader Dias
Jader Dias

Reputation: 90475

How to force the removal of a windows service?

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?

Upvotes: 3

Views: 15498

Answers (3)

Patrick Desjardins
Patrick Desjardins

Reputation: 140803

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.

Upvotes: 6

spoulson
spoulson

Reputation: 21591

At the command line:

sc delete "service_name"

Upvotes: 14

Henrik P. Hessel
Henrik P. Hessel

Reputation: 36617

Try to install the executable again and then remove it.

OR: Delete it in your Registry

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

and restart.

Upvotes: 2

Related Questions