views:

92

answers:

1

Hi!

I created a scheduler. It was threaded first, but because of memory leaks and separatable tasks I changed to subprocesses.

The service starts the subprocesses by N minutes or in determined time. I finished with all thing, but I'm not sure now that service can start an application or not?

I want to use this as processfarm - as PostgreSQL in Windows. But I want to avoid that virusscanners "eat" (block) my subprocesses, and I need all rights to run them.

Can I do thins under any OS from WinXP to Win7?

What I need to pre-think, what with I need to calculate, etc.?

Thanks for your every answer: dd

+2  A: 

Yes, services can start other programs.

Rob Kennedy
Just note that if the launched program is a visual app, it needs to be run inside a user's interactive session in order to be visible onscreen. Use CreateProcessAsUser() instead of CreateProcess() for that.
Remy Lebeau - TeamB
And how to I start a process to it begin as child process of the Master (the Scheduler) service?
durumdara
Use [`CreateProcess`](http://msdn.microsoft.com/en-us/library/ms682425.aspx). Or, as the comment above already suggested, [`CreateProcessAsUser`](http://msdn.microsoft.com/en-us/library/ms682429.aspx). I'm sure that question has already been answered here on Stack Overflow.
Rob Kennedy