views:

2700

answers:

6

I installed a windows service using installUtil.exe.

After updating the code I used installUtil.exe again to install the service w/o uninstalling the original version first.

When I now try to uninstall the service, installUtil.exe completes the uninstall successfully, but the service still appears.

If I try to change its properties, I receive the message 'service is marked for deletion'.

How can I force the deletion (preferrably w/o restarting the server)?

+1  A: 

Unfortunately, you need to restart the server. That should remove the "deleted" service.

seanyboy
Sad but true. At least it worked.
Manu
+1  A: 

Have you try stopping the service before calling uninstall? I had this problem randomly. Sometime I could remove it without restarting. My guess is that it has to do with the service still running

faulty
+3  A: 
sc delete sericeName

Just make sure the service is stopped before doing this. I have seen this work most times. There are times where I have seen windows get stuck on something and it insists on a reboot.

Aaron Weiker
+2  A: 

well, you can use SC.EXE to delete any windows Service forcefully if un-install doesnt removes by any chance.

sc delete <Service_Name>

Read more on "MS Techno Blogging" Deleting Services Forcefully from Services MMC

Chandreshwar
A: 

Refreshing the service list always did it for me. If the services window is open, it will hold some memory of it existing for some reason. F5 and I'm reinstalling again!

Jer
+2  A: 

One thing that has caught me out in the past is that if you have the services viewer running then that prevents the services from being fully deleted, so close that beforehand

the_mandrill