.net – How to force uninstallation of windows service

netwindows-services

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)?

Best Answer

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