Starting an .exe from a .NET Windows Service C#.

  • Thread starter Thread starter roberth
  • Start date Start date
R

roberth

Hi,

I've created a simple Windows Service that starts an .exe with
Process.Start(). However, I've noticed that when I logoff from one
user account to another the child process (.exe) is shutdown (although
the service is still running). This behaviour makes my Windows service
useless, as all the hard work is done by the .exe (not written in C#).
Is there a way to prevent this from happening?

Cheers,

Rob
 
Hi,

I've created a simple Windows Service that starts an .exe with
Process.Start(). However, I've noticed that when I logoff from one
user account to another the child process (.exe) is shutdown (although
the service is still running). This behaviour makes my Windows service
useless, as all the hard work is done by the .exe (not written in C#).
Is there a way to prevent this from happening?

Cheers,

Rob

Does your service do anything besides start the exe? There's a tool on
the NT resource kit called SrvAny which allows you to run any exe as a
service which might do what you want.
 
Hi,

When the user logoff all his processes are terminated.
So you should try to run the spawned process as a system process.

How is your service running?
 
Back
Top