How To Close Registered Service as User Logs Off 
Author Message
 How To Close Registered Service as User Logs Off

Hi Folks!

I have successfully used the RegisterServiceProcess to register a
process as a service in Win95.

The reason I did this so, was to hide the application's entry from the
'Close Program' dialog box when you use CTL+ALT+DEL, so noone could
close my hidden app this way.

Now, I have another problem on my case: How could I ensure that the
so-called 'service' is closed when the user logs off ie chooses 'close
all programs and log on as a different user' in the shutdown dialog.

The problem is, is that I want to hide the app from the close program
task list, but I do not want it running as a service. I have a dilemma
here.

Please, is there anybody who could help me with this. I thought of an
idea to use subclassing and determine when windows is ready to shut
down. But that's about all I've thought of. I've no doubt that there is
a way to hide a program from the close program list without having to
resort to running it as a service. I just don't know how.

Any help, ideas, would be greatly appreciated.
Thanks.



Sat, 16 Sep 2000 03:00:00 GMT  
 How To Close Registered Service as User Logs Off

I can think of three possibilities...

1. Run you VB app as the shell instead of explorer. Or use system policies
to make it the only application allowed to be run.

2. Have your app look for the window 'Please logon' and exit when it 'sees'
it.

3. Watch for the explorer task to be removed from the task list and exit
your app.

Rod Clark



Quote:
> Hi Folks!

> I have successfully used the RegisterServiceProcess to register a
> process as a service in Win95.

> The reason I did this so, was to hide the application's entry from the
> 'Close Program' dialog box when you use CTL+ALT+DEL, so noone could
> close my hidden app this way.

> Now, I have another problem on my case: How could I ensure that the
> so-called 'service' is closed when the user logs off ie chooses 'close
> all programs and log on as a different user' in the shutdown dialog.

> The problem is, is that I want to hide the app from the close program
> task list, but I do not want it running as a service. I have a dilemma
> here.

> Please, is there anybody who could help me with this. I thought of an
> idea to use subclassing and determine when windows is ready to shut
> down. But that's about all I've thought of. I've no doubt that there is
> a way to hide a program from the close program list without having to
> resort to running it as a service. I just don't know how.

> Any help, ideas, would be greatly appreciated.
> Thanks.



Thu, 21 Sep 2000 04:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Are resources still valid for an NT service after user logs off

2. Closing Connection not logging off user

3. Preventing a VB app from closing when user logs off in Win '95

4. How do i make a server program that will log and log off other users

5. Programmatically kill user connection/log user off server.

6. HELP: Adding Icon to SysTray after Log Off for service app

7. Solution: Preventing Windows from closing my VB app on log off

8. Logging off users

9. Logging Users off an Access Database

10. compacting, force user to log off

11. Unable to log a user off in VBA

12. Logging Users Off The System

 

 
Powered by phpBB® Forum Software