Mark for deletion Error when Installing Window Service

Problem
I got this error when I am trying to reinstall the Windows service after uninstallation. I did the following steps to re install the service.

a) I stopped the existing windows service using Administrative Tools –> Service
b) Keeping this Administrative tools –> Services window open, I tried to uninstall the service using InstallUtil.exe
c) I got the message “Service uninstallation successful”.
d) And then I tried installing the service again. It failed to install the service saying specified service has been marked for deletion.
Error message
An exception occurred during the Install phase. System.ComponentModel.Win32Exception: The specified service has been marked for deletion.
Cause
The registry entries related to the service are not deleted during the uninstallation. This error generally occurs when the service is uninstalled without stopping the existing service. However I got this error even when I uninstalled the service after stopping the service. This is because the Administrative Tools –>Services window is open when I was uninstalling the service. The registry entries are not deleted if the services window is kept open.
Solution
I found the following solution in newsgroups.

1. Stop the service
2. Close the Administrative Tools à Service window if it is open
3. Uninstall the service (only after closing the Administrative tools–> Services window. Opening the Services window during the uninstallation is the key reason why the above error is raised.)
4. Re Install the service again

Source: www.code101.com

,

  1. #1 by Lindsey Hutchinson on December 12th, 2010 - 1:51 pm

    I’d love a tutorial on how to uninstall services. We’ve had major problems with one of the top vendors of billing software for Windows and we tried deleting the service from the registry but we’ve ended up having to reinstall the whole pakage.

(will not be published)
Submit Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Subscribe to comments feed
  1. No trackbacks yet.

SetPageWidth