ECS Home Automation and Security Archives
  learn more | view messages for this month | NetBloc® | terms of use | search

Google
 


  subject (prev) or (next) | time (prev) or (next) | author (prev) or (next) | view more subjects

Subject:
From:
Date:
Re: [ecs] might anyone know how to run ECS (or any other pgm) withOUT logging into XP ?
Kevin Keane
Wed, 14 Jun 2006 23:05:45 -0700

You have to turn ECS into a service.

As long as ECS does not require any user interaction (that is basically,
doesn't open any windows), you can probably use one of the available
utilities that run as service and then launches any program.

The better approach is to actually turn ECS into a service itself.
Basically, it involves adding a ServiceMain function (instead of the
usual main() ) and some other functions, and it also involves making
sure that ECS correctly responds to the messages Windows sends it
(primarily, to start, stop and suspend the service). With the service
utilities, ECS would simply get killed when the service is stopped, and
may not have time to complete whatever it was doing.

http://www.devx.com/cplus/Article/9857/0/page/3 describes the basic
structure of a service.

By the way, it is OK to have both ServiceMain and main() in the same
program; in that case, you can run the same program both as a service
and as a regular program.

There are a couple other issues to consider: security and permissions
are foremost. If at all possible, a service should always run as user
LOCAL SYSTEM for security reasons. This user has minimal permissions.

Another consideration is that you don't have access to the screen, and
normally also not to stdout. So any output has to go to the event log or
to a log file, and you can't ever wait for the user to click OK.

-- 
Kevin Keane <ingoecs@kkeane.com>

  subject (prev) or (next) | time (prev) or (next) | author (prev) or (next) | view more subjects




Services provided by [NetBloc]®! NetBloc Solutions Inc.
Terms of use. Indexing software (c) 1999 Lin-De, Inc
.