[service] Detecting login / logout / inactive account

  • Thread starter Thread starter Eduard Witteveen
  • Start date Start date
E

Eduard Witteveen

Dear list,

In the corporation, we want to know who is using which computer, and do
some phone routing based upon this information.
When a user log's uses it's account to login, the phone on the desk
should also ring on the same desk. When the user leave's / sleeping, we
dont want the phone to ring, so we want to detect this also.

By using a service i can keep a program running, without irritating the
users with icon's / message's at startup,.. etc so i want to use a service.
My problem is, how i can catch the login / inactivity / logout. Maybe
there are some hooks which i could use? or should i look at the
processlist every so much time, and determine the activity based upon this?
 
Eduard,

I don't think that a service is the way to go here. I think for this,
you want to write a replacement for the Graphical Identification and
Authentication DLL (GINA.dll). It will allow you to determine when someone
logs in, as well as when the machine is locked/hibernated, etc, etc.

For more information, check out the following document at MS:

http://www.microsoft.com/technet/prodtechnol/windows2000serv/maintain/security/msgina.mspx

Hope this helps.
 
Auditing Logon/Logout events is one possible option, you just have to
read/parse the Security log to find the successful logon/logoff messages in
your service.
Another option is to install an ManagementEventWatcher (using
System.Management) to capture the Logon/Logoff WMI Win32_LogonSession
events.


Willy.

| Dear list,
|
| In the corporation, we want to know who is using which computer, and do
| some phone routing based upon this information.
| When a user log's uses it's account to login, the phone on the desk
| should also ring on the same desk. When the user leave's / sleeping, we
| dont want the phone to ring, so we want to detect this also.
|
| By using a service i can keep a program running, without irritating the
| users with icon's / message's at startup,.. etc so i want to use a
service.
| My problem is, how i can catch the login / inactivity / logout. Maybe
| there are some hooks which i could use? or should i look at the
| processlist every so much time, and determine the activity based upon
this?
 

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

Back
Top