Xerratus
Happily stressed out, since 1974


 
Tuesday, January 17, 2006
<< Going under the knife
Sure wish it would rain here in Portland >>

Problem:
While working on a custom Windows Service today I ran into a situation where I couldn't uninstall it (via the .msi, installutil /u, or "add/remove programs").  Countless installing/uninstalling lead to this but I had to get it off so that I could complete the task.  

Solution:
Delete the registry key associated with it
    HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/[service name]

Note:
This is and should be used as a "last resort" for removing a service if all of the below options don't work:
  1. InstallUtil /u [service name] fails.
  2. The .msi setup package cannot "remove" it.
  3. "add/remove programs" fails to remove the service as well.
Also, You'll have to reboot for list to update in the Service Control Manager (SCM).