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

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
 
D

DeveloperX

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.
 
I

Ignacio Machin \( .NET/ C# MVP \)

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top