By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,948 Members | 795 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,948 IT Pros & Developers. It's quick & easy.

[service] Detecting login / logout / inactive account

P: n/a
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?
Apr 7 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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/pro...ty/msgina.mspx

Hope this helps.
"Eduard Witteveen" <ne**@nerNOSPAMgens.org> wrote in message
news:44***********************@news.euronet.nl...
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?

Apr 7 '06 #2

P: n/a
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.

"Eduard Witteveen" <ne**@nerNOSPAMgens.org> wrote in message
news:44***********************@news.euronet.nl...
| 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?
Apr 7 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.