Microsoft KB Archive/823942

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

Article ID: 823942

Article Last Modified on 2/11/2006

-

APPLIES TO


 * Microsoft Visual Studio .NET 2003 Enterprise Architect
 * Microsoft Visual Studio .NET 2003 Enterprise Developer
 * Microsoft Visual Studio .NET 2003 Academic Edition

-





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.

Note To remove the service by using an .msi file, right-click the program icon for the .msi file, and then click Uninstall.
 * 1) 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 &quot;Applies to&quot; 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 &quot;Walkthrough: Creating a Windows Service Application in the Component Designer&quot; topic in the Visual Studio .NET documentation in the Microsoft Developer Network (MSDN) Library.

Keywords: kberrmsg kbbug kbqfe kbpending kbhotfixserver kbvs2005swept kbvs2005doesnotapply KB823942

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.