latpub.blogg.se

Lansweeper agent service
Lansweeper agent service









  1. #LANSWEEPER AGENT SERVICE INSTALL#
  2. #LANSWEEPER AGENT SERVICE CODE#
  3. #LANSWEEPER AGENT SERVICE WINDOWS#

If your communications needs are minimal, using application-defined Service Control Manager commands might also do the trick.

#LANSWEEPER AGENT SERVICE CODE#

The only reliable fix for these issues is to eliminate all UI code from your service, and move it to a separate executable that runs inside the interactive user session (the executable can be started using the global Startup group, for example).Ĭommunication between your UI code and your service can be implemented using any RPC mechanism: Named Pipes work particularly well for this purpose. The most likely reason your service is hanging on startup, is because it's trying to interact with a nonexistent desktop (or assumes Explorer is running inside the system user session, which also isn't the case), or waiting for input from an invisible desktop.

#LANSWEEPER AGENT SERVICE WINDOWS#

Cross-window station access has always been frowned upon, as it's a security risk, but whereas previous Windows versions allowed some exceptions, these have been mostly eliminated in Vista and later operating systems. The window station assigned to services running under a given account is completely different from the window station of the logged-on interactive user. Windows internally manages several window stations, each with their own desktop. "before Vista"), this is extremely tricky. If you continue down the road of trying to make your service interact with the user's desktop directly, you'll lose: even under the best of circumstances (i.e. Is this possible, and if so how?Īny pointers to the above questions would be appreciated! Secondly - taking a step back, all I'm trying to achieve, is simply a windows service that provides a gui for configuration - I'd be quite happy to run using the non-Local System Account (with named user/pwd), if I could get the service to interact with the desktop (that is, have a context menu available from the system tray). My first question is - why might the "Local System Account" login takes SOOOOO MUCH LONGER than when the service logs in with the non-LocalSystemAccount, causing the windows service time-out? what's could the difference be between these two to cause such different behavior at start up?

lansweeper agent service

Incidentally, I increased the windows service timeout from the default 30 seconds to 2 minutes via a registry hack (see, search for TimeoutPeriod in section 3), however the service start up still times out. service on Local Computer.Įrror 1053: the service did not respond to the start or control request in a timely fashion.

lansweeper agent service

Here is the problem though - when I choose the "LocalSystemAccount" option, and check the "interact with desktop" option, the service takes AGES to start up for no obvious reason, and I just keep gettingĬould not start the.

#LANSWEEPER AGENT SERVICE INSTALL#

When I install the service via "installutil" using a named account (i.e., not Local System Account), the service runs fine, but doesn't display the icon in the system tray (I know this is normal behavior because I don't have the "interact with desktop" option).

lansweeper agent service

My code works fine in debug mode, and I get the context menu come up, and everything behaves correctly etc.

lansweeper agent service

The reason why we need a gui for a windows service is in order to be able to re-configure the behaviour of the windows service(s) without resorting to stopping/re-starting. I have recently inherited a couple of applications that run as windows services, and I am having problems providing a gui (accessible from a context menu in system tray) with both of them.











Lansweeper agent service