How can I keep an application running after logout?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I wrote a .NET windows service,and change the type to Interactive Services.
In method OnStart ,I start a .NET application. But after I logout,that
application terminates unlike the behavior of Win32 app. How can I keep it
running ?
 
I wrote a .NET windows service,and change the type to Interactive Services.
In method OnStart ,I start a .NET application. But after I logout,that
application terminates unlike the behavior of Win32 app. How can I keep it
running ?

Your application exits because even though you are launching it from a
Windows Service, it is still a normal Windows application that has not been
designed to run in the background without a user being logged on. Windows
Services, unlike normal Windows application, are designed specifically to
run in the background with or without a user logged on. They implement
special interfaces that normal application don't implement and that allow
Windows to let them run even when the interative user logs off.

There is a project on the code project though that seems to allow you to
launch normal applications as Windows Services. I have not tried it so i
don't know how it works and if it really works. In either case, that's a
dirty hack so use it only if you really have no other choice than that:
<http://www.codeproject.com/system/xyntservice.asp>
 
Back
Top