I have built a test NS application locally. When I attempted to start
the service it failed. Here is the error from Event Viewer:
<NotificationServicesEvent>
<Description>
Notification Services encountered an error while starting the
service.
</Description>
<Context>
<EventParameters>
<InstanceName>MDCNotif</InstanceName>
<ProblemDescription>The instance database could not be found.
Leaving aside the annoyance that the service is automatically renamed
NS$InstanceName but the service's reference to the database must use
NS$ explicitly or it cannot find the databas, I believe I need to
complete delete and unregister the service to rebuild it with the
correct database name because the update command has no argument for
the name of the database. So, I decided to tyr and delete and
unregister the application ...
Running nscontrol unregister didn't delete all the registry keys for
an NS application that were created by nscontrol register. I
originally ran the command with the Service Control Manager window
open and the command line returned with a message that the service
could not be deleted but had been marked for deletion.
"The Notification Services Windows service is being deleted.
The Service Control Manager could not delete the Notification Services
process.
The Service Control Manager could not delete the Notification Services
process.
Win32ErrorCode: 1072
Win32 error text: The specified service has been marked for deletion."
Then I closed the SCM and ran the command line again and this time it
returned a message that the NS Service could not be found, presumably
because it had already been marked for deletion. When I reopened the
SCM, the service was no longer visible. However, all the supporting
registry entries are still in the registry and are not removed by
repeated attempts to run nscontrol unregister These are:
HKLM\SYSTEM\ControlSet001\Enum\Root\LEGACY_NS$[NSInstanceName]\
HKLM\SYSTEM\ControlSet002\Enum\Root\LEGACY_NS$[NSInstanceName]\
HKLM\SYSTEM\ControlSet002\Services\NS$[NSInstanceName]\
HKLM\SYSTEM\ControlSet002\Services\NS$[NSInstanceName]: Delivery
Channels\
HKLM\SYSTEM\ControlSet002\Services\NS$[NSInstanceName]: Distributors\
HKLM\SYSTEM\ControlSet002\Services\NS$[NSInstanceName]: Event
Providers\
HKLM\SYSTEM\ControlSet002\Services\NS$[NSInstanceName]: Events\
HKLM\SYSTEM\ControlSet002\Services\NS$[NSInstanceName]: Generator\
HKLM\SYSTEM\ControlSet002\Services\NS$[NSInstanceName]: Notifications\
HKLM\SYSTEM\ControlSet002\Services\NS$[NSInstanceName]: Subscribers\
HKLM\SYSTEM\ControlSet002\Services\NS$[NSInstanceName]: Subscriptions\
HKLM\SYSTEM\ControlSet002\Services\NS$[NSInstanceName]: Vacuumer\
HKLM\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_NS$[NSInstanceName]\
I believe I need to delete all of these keys and recreate and
reregister the service because it was originally created with an
incorrect name of the associated database. Do I need to delete all of
these keys, or can I simple recreate and reregister the service with
the correct information? Also, why aren't these keys removed by
unregister? Is it because I originally ran the unregister with the
SCM open and the utility could only mark the service for deletion
rather than delete it? I am about to run a separate VBS to manually
delete these keys, but I thought I'd ask about this before I went
ahead and ran that.
Any help from MS or otherwise appreciated ...