You are currently offline, waiting for your internet to reconnect

BUG: "The specified service has been marked for deletion" error message when you reinstall a service in Visual Studio .NET

SYMPTOMS
When you try to reinstall a service in a Microsoft Windows Service application on a Microsoft Windows 2000-based computer, you may receive the following error message:
The specified service has been marked for deletion
When this problem occurs, the service is not reinstalled.
CAUSE
This problem may occur if the following conditions occur in this order:
  1. You install a service in a Windows Service application.
  2. You remove the service by using a Windows Installer (.msi) file.

    NoteTo remove the service by using an .msi file, right-click the program icon for the .msi file, and then click Uninstall.
  3. You reinstall the same service without first restarting the computer.
If you installed the service on a Windows 2000-based computer, you must restart the computer before you can reinstall the service.

In Windows 2000, services are not completely deleted until the computer is restarted. Although you do not receive a prompt to restart the computer after you remove the service, you must restart the computer before you reinstall the service.

Note If you remove the service by using an executable (.exe) file, you receive a prompt to restart the computer.
WORKAROUND
To work around this problem, restart the computer before you reinstall the service.

Note If you first verify that the service is stopped, and then you quit the Microsoft Management Console (MMC) before you remove the service, you may be able to reinstall the service without restarting the computer.
STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section of this article.
MORE INFORMATION
For more information about how to add a service and about how to remove a service in a Windows Service application, see the "Walkthrough: Creating a Windows Service Application in the Component Designer" topic in the Visual Studio .NET documentation in the Microsoft Developer Network (MSDN) Library.
Properties

Article ID: 823942 - Last Review: 02/11/2006 00:17:35 - Revision: 1.5

  • Microsoft Visual Studio .NET 2003 Enterprise Architect
  • Microsoft Visual Studio .NET 2003 Enterprise Developer
  • Microsoft Visual Studio .NET 2003 Academic Edition
  • kbvs2005swept kbvs2005doesnotapply kbhotfixserver kbqfe kberrmsg kbpending kbbug KB823942
Feedback