How to make an interactive NT service to survive from user log off?

How to make an interactive NT service to survive from user log off?

Post by Kishor » Sat, 29 Jan 2000 04:00:00



Hi All,

I have a Windows NT service which spawns a win32 user-interface application
so that application runs in the context of a service (so that I can use APIs
like LogonUser).

I have made this service to be started 'Automatically' Log On As 'System
Account' with 'Allow Service to Interact with Desktop' access.

The problem is when a user logs on to machine and logs out, my win32
application is getting closed. Is there any way I tell the windows to
proceed with Log Off without closing my application.

The program SRVANY.EXE shipped with Windows NT Resource Kit seems to handle
this problem. I appreciate if someone can help me in this?

Thanks,
Kishore

 
 
 

How to make an interactive NT service to survive from user log off?

Post by Javi Iriberr » Tue, 01 Feb 2000 04:00:00


Hi!
I'm having the same problem.
Please help us...
--

Javi Iriberri


>Hi All,

>I have a Windows NT service which spawns a win32 user-interface application
>so that application runs in the context of a service (so that I can use
APIs
>like LogonUser).

>I have made this service to be started 'Automatically' Log On As 'System
>Account' with 'Allow Service to Interact with Desktop' access.

>The problem is when a user logs on to machine and logs out, my win32
>application is getting closed. Is there any way I tell the windows to
>proceed with Log Off without closing my application.

>The program SRVANY.EXE shipped with Windows NT Resource Kit seems to handle
>this problem. I appreciate if someone can help me in this?

>Thanks,
>Kishore


 
 
 

How to make an interactive NT service to survive from user log off?

Post by Girish Bharadwa » Wed, 02 Feb 2000 04:00:00


AFAIK, you might have to handle WM_ENDSESSION.. I think that passes the
EWX_REALLYLOGOFF (Is this only on 95 .. ??) or ENDSESSION_LOGOFF.. If that
is the case, you might return FALSE.. I have not used this. So, you might
have to test it and see if it works.

--
Girish Bharadwaj[mvp]

> Hi!
> I'm having the same problem.
> Please help us...
> --

> Javi Iriberri


> >Hi All,

> >I have a Windows NT service which spawns a win32 user-interface
application
> >so that application runs in the context of a service (so that I can use
> APIs
> >like LogonUser).

> >I have made this service to be started 'Automatically' Log On As 'System
> >Account' with 'Allow Service to Interact with Desktop' access.

> >The problem is when a user logs on to machine and logs out, my win32
> >application is getting closed. Is there any way I tell the windows to
> >proceed with Log Off without closing my application.

> >The program SRVANY.EXE shipped with Windows NT Resource Kit seems to
handle
> >this problem. I appreciate if someone can help me in this?

> >Thanks,
> >Kishore

 
 
 

How to make an interactive NT service to survive from user log off?

Post by Mike [NO SPAM » Wed, 02 Feb 2000 04:00:00


check out support.microsoft.com   knowlegebase article : Q175948

all you need to know - if it's vb app


>Hi All,

>I have a Windows NT service which spawns a win32 user-interface application
>so that application runs in the context of a service (so that I can use
APIs
>like LogonUser).

>I have made this service to be started 'Automatically' Log On As 'System
>Account' with 'Allow Service to Interact with Desktop' access.

>The problem is when a user logs on to machine and logs out, my win32
>application is getting closed. Is there any way I tell the windows to
>proceed with Log Off without closing my application.

>The program SRVANY.EXE shipped with Windows NT Resource Kit seems to handle
>this problem. I appreciate if someone can help me in this?

>Thanks,
>Kishore

 
 
 

1. Service does not survive a log off.

I have an app that can run either as a normal desktop app or as an
interactive service.   The problem I am having is that when the app is
running as a service on a Terminal Server box the service will shutdown
if the only one user on the box logs off.

Could the reason be that it is an interactive service and has a hidden
window?  If that is so what do I need to do to prevent the service from
stopping when the hidden window gets destroyed?

Could it be because the majority of the work is being done on the
CWinApp's Run() thread instead of the service's thread?

Tim

2. MS will fix this by sending rejection e-mails to us :(

3. Urgent: Why my Interactive Service broken down when I log off win2000?

4. VMS 6.2 and 9Gb SCSI drives

5. NT Service doesn't see user environment when logged on as a specific user.

6. Q: Speech recognition model

7. Logging a user off from a Service

8. Fears

9. Programs don't close when one user logs off and another logs on?

10. Log on/Log off users on remote computer

11. ??? Is it possible to reboot from an NT Service when logged off?

12. How to prevent a system process from being destroyed when user logs off Win NT / 2K ?