Re: Make a Windows Service start a windows program.
- From: "Willy Denoyette [MVP]" <willy.denoyette@xxxxxxxxxx>
- Date: Wed, 22 Feb 2006 19:05:52 +0100
"deko" <deko@xxxxxxxxxx> wrote in message
news:qf2dnWoPNv6WOWHeRVn-sg@xxxxxxxxxxxxxx
|> The OP's question relates to a "windows" program, not a console style
| > program. Note that the same remark about the user profile applies when
| > starting a console application, an application that considers it's
profile
| > being loaded when started will fail if started from a service.
| > In general, services should not start other applications, unless you
have
| > full control of it's UI and profile context.
|
| What do you mean when you say:
|
| > "unless you have full control of it's UI and profile context"?
|
Well I mean that it's possible for the program that gets launched from a
Windows Service session, to load the environment and profile of an
interactive user, it's also possible to migrate the current desktop to the
(visble) interactive desktop, but this is not a trivial task and requires
some thorough understanding of the OS security system.
| I have a similar situation where a service needs to instantiate an object
| contained in a WinForms app. The service and the app are installed as a
| pair; the UI is used to define the action taken by the service at
| pre-defined intervals.
|
I suppose you mean instantiate an object through remoting right? This is not
a problem as long as the WinForms app is started from an interactive logon
session and not from the service.
| When constructing the assembly in Visual Studio that contains the
| application/service pair, should the service and the app be in a separate
| namespaces? Does it make any difference? The design goal is to keep the
| service and the app a loosely coupled as possible since they run in
| different security contexts.
|
Namespace are irrelevant here, what matters is the assemblies, both your
service and the WinForms app. should reside in a separate assembly.
Willy.
.
- Follow-Ups:
- References:
- Make a Windows Service start a windows program.
- From: UJ
- Re: Make a Windows Service start a windows program.
- From: Willy Denoyette [MVP]
- Re: Make a Windows Service start a windows program.
- From: KBuser
- Re: Make a Windows Service start a windows program.
- From: Willy Denoyette [MVP]
- Re: Make a Windows Service start a windows program.
- From: deko
- Make a Windows Service start a windows program.
- Prev by Date: Re: Make a Windows Service start a windows program.
- Next by Date: Re: Simple reflection example?
- Previous by thread: Re: Make a Windows Service start a windows program.
- Next by thread: Re: Make a Windows Service start a windows program.
- Index(es):
Relevant Pages
|
Loading