Tuesday, 31 March 2015

Make sure a windows service is really removed

Sometimes when I uninstall a service with Topshelf everything reports back as normal but the service could still be seen in the services pane.

An alternative way to force a removal of a service is to use:


I was then given the message:

 "The specified service has been marked for deletion" with FAILED 1072

The service was still visible in the services pane even though I refreshed it.

The problem was that I had task manager (with the process view) running. After having closed task manager I re-run the above code and then got the message "The specified service does not exists as an installed service" with failed 1060. After a refresh it was not removed from the services pane. 

Case closed!


No comments:

Post a Comment