Code Comments
Programming Forum and web based access to our favorite programming groups.I have written a Windows service in J# and a setup wizard to go with it;
however, I have one problem....
My Windows service creates it's own Event Log and writes events to it.
However, some testing has revealed the service will fail to
automatically start on boot and I have narrowed it down to the situation
wherein the Event Logger isn't started prior to Windows attempting to start
my service. I have worked around the problem by having my service query
whether it is started and starting it itself:
if (eventLogController.get_Status() == ServiceControllerStatus.Stopped)
{
eventLogController.Start();
}
Even though the solution fixes the problem, I don't like it. I know there's
got to be a way to have the dependency listed. I found some mention in MSDN
to a control block that would have a list of dependency names, but that
doesn't seem to correlate to anything I can see in the J# project.
I can't find a way in the service or the setup project associated with it to
list Eventlogger as a dependency so that Windows will start it first. I was
wondering if anyone knew how to build my setup project or alter the service
properties in the VS2005 IDE such that when the service is installed, the
dependency is listed and honored appropriately.
Thanks,
Stephen Cuppett
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.