I recently inherited a couple of applications that run as Windows services, and I'm having problems providing gui (accessible from the context menu in the system tray) with both of them.
The reason we need gui for a Windows service is to be able to reconfigure the behavior of the Windows services (s) without resorting to stopping / restarting.
My code works fine in debug mode, and I get a context menu, and everything behaves correctly, etc.
When I install the service through "installutil" using a named account (that is, not a local system account), the service works fine, but does not display an icon on the taskbar (I know that this is normal behavior because I donโt have the option " interact with the desktop ").
Here's the problem: if I select the "LocalSystemAccount" option and check the "interact with the desktop" option, the service starts AGES to start without any obvious reason, and I just keep getting
Failed to start the service ... on the local computer.
Error 1053: The service did not respond to a start or control request in a timely manner.
By the way, I increased the default Windows service timeout from 30 seconds to 2 minutes through a registry hacker (see http://support.microsoft.com/kb/824344 , search for TimeoutPeriod in section 3), however, the service still does not start works.
My first question is: why does the โLocal System Accountโ account accept SOOOOO MUCH LONGER than when the service logs in with a non-LocalSystemAccount, causing a Windows service timeout? what's the difference between the two to cause this behavior at startup?
Secondly - taking a step back, all I'm trying to achieve is just a Windows service that provides gui for configuration - I would be very happy to start using a non-Local System Account (named user / pwd) if I could make the service interact with the desktop (that is, have a context menu available in the system tray). Is this possible, and if so, how?
Any pointers to the above questions would be appreciated!
windows timeout error-handling windows-services
deejjaayy 01 Oct '08 at 16:06 2008-10-01 16:06
source share