BUG: Service Startup Type Is Disabled (287516)
The information in this article applies to:
- Microsoft Win32 Application Programming Interface (API), when used with:
- the operating system: Microsoft Windows 2000
This article was previously published under Q287516 SYMPTOMS
After a service has been deleted, the Startup Type of the service may be shown as "Disabled" within the Services snap-in for Microsoft Management Console (MMC). This will occur if the MMC Services snap-in was open prior to deletion of the service and was used to stop the service before it was deleted.
CAUSE
The Services snap-in does not close the service handle after it stops a service. When a service is deleted, the Service Control Manager marks the service for deletion, but the service will not actually be deleted until all handles to the service are closed. An attempt to query the service configuration will fail once the service has been marked for deletion. The Services snap-in shows the startup type for a service as "Disabled" when its configuration cannot be queried.
RESOLUTION
The service will successfully be removed once the Services snap-in is closed and all other handles to the service are closed.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. MORE INFORMATION
This problem will only occur if a service is stopped from the Services snap-in and an application thereafter programmatically deletes the service but the Services snap-in remains open.
A service can be deleted programmatically through use of the DeleteService() API or through the command-line utility SC.exe, which comes with the Windows 2000 Resource Kit. As long as the Services snap-in has an open handle to the service, all other service-related operations against the deleted service will fail with error 1072 (ERROR_SERVICE_MARKED_FOR_DELETE).
This problem will not occur if the service is stopped using command-line utilities like SC.exe or NET.exe or programmatically using the ControlService() API with the control code SERVICE_CONTROL_STOP.
Modification Type: | Major | Last Reviewed: | 10/23/2003 |
---|
Keywords: | kbAPI kbbug kbKernBase kbnofix kbSCM kbService KB287516 |
---|
|