sharing variables accros processes & process starting 
Author Message
 sharing variables accros processes & process starting

hi all

I want to have an NT service fire up certain processes depending upon some
specific characteristics.

I have some questions i hope some of you can answer.

Can an NT service start either a win32 application, or a win32 console
application, when no user is logged on.

secondly, what is the best way for me to pass some data, or a pointer to
some data from the NT service to the process is creates?

tia

mike



Sun, 18 Nov 2001 03:00:00 GMT  
 sharing variables accros processes & process starting
Yes.  An NT service can launch new processes.  By default they will run under
the same account (e.g., LocalSystem) that the service is running under.  To run
under a different account it will need access to credentials for that account
(e.g., a token), and use an API such as CreateProcessAsUser.

There's a few different mechanisms to pass data to child processes:
memory-mapped files, environment variables, inherited object handles,
WM_COPYDATA, anonymous pipes.  "Best" depends on a number of factors (speed,
security, ease of coding, ...).

Quote:

> hi all

> I want to have an NT service fire up certain processes depending upon some
> specific characteristics.

> I have some questions i hope some of you can answer.

> Can an NT service start either a win32 application, or a win32 console
> application, when no user is logged on.

> secondly, what is the best way for me to pass some data, or a pointer to
> some data from the NT service to the process is creates?

> tia

> mike

-- Aaron
---------------------
Aaron J Margosis

Fortress-NT - NT Workstation/Server Security Utility:
    http://www.sunbelt-software.com/fortress.htm
ScrnSaveSwitch/Plus - Screen Saver Control Utility:
    http://www.ssswitch.com


Fri, 23 Nov 2001 03:00:00 GMT  
 sharing variables accros processes & process starting
I have found COM to be the best and easiest way to "pass" variables,
especially if there is two-way communication.  However, it is an All or
nothing proposition.

-Andy



Quote:
> Yes.  An NT service can launch new processes.  By default they will run
under
> the same account (e.g., LocalSystem) that the service is running under.
To run
> under a different account it will need access to credentials for that
account
> (e.g., a token), and use an API such as CreateProcessAsUser.

> There's a few different mechanisms to pass data to child processes:
> memory-mapped files, environment variables, inherited object handles,
> WM_COPYDATA, anonymous pipes.  "Best" depends on a number of factors
(speed,
> security, ease of coding, ...).


> > hi all

> > I want to have an NT service fire up certain processes depending upon
some
> > specific characteristics.

> > I have some questions i hope some of you can answer.

> > Can an NT service start either a win32 application, or a win32 console
> > application, when no user is logged on.

> > secondly, what is the best way for me to pass some data, or a pointer to
> > some data from the NT service to the process is creates?

> > tia

> > mike

> -- Aaron
> ---------------------
> Aaron J Margosis

> Fortress-NT - NT Workstation/Server Security Utility:
>     http://www.sunbelt-software.com/fortress.htm
> ScrnSaveSwitch/Plus - Screen Saver Control Utility:
>     http://www.ssswitch.com



Fri, 23 Nov 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Process.Start Process.End??

2. Sharing variables across processes

3. Sharing variables between 2 processes

4. two processes, shared memory & signal

5. Child Process & Parent Process Data :: Win32

6. how to minimize program started with Process.Start

7. Sharing an object between processes

8. sharing data between processes

9. Sharing objects between processes

10. Help for share tab between 2 process

11. shared memory for processes?

12. Multiple processes sharing data space. --- HELP

 

 
Powered by phpBB® Forum Software