Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Manually uninstall a Windows service

Status
Not open for further replies.

Hexonx

Programmer
Jan 10, 2001
102
US
For various reasons, installutil.exe can experience errors when uninstalling a Windows service based on a .NET assembly and the service never gets uninstalled. I ran across this problem recently (for the nth time!) and I wanted to post my findings.

To uninstall the service, simply delete the following registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MySvc

where "MySvc" is the name of the service to uninstall. After that, reboot and all should be well.

Note: If you search the registry, you may find the key listed under other sections, such as "ControlSet001". I left these alone and only deleted the key under CurrentControlSet.
 
Hi Hexonx,

I found another way to stop and uninstall windows service, first you try to uninstall it using the installutil.exe, if it fails, simply do the following:
1] go to your Visual Studio.NET environment
2] from the Tools menu, choose "Debug Processes"
3] locate your windows service and choose "attach"
4] select the attached windows service from the bottom list and choose "Terminate"

doing the previous you do not need to restart your pc.

Note: in your way, just try using installutil.exe -u for your service, if it fails, just restart your computer without deleting anything from the registry, you will see that the service is removed when the windows starts again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top