Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Keep track of users logging on and off

Posted on 2004-10-19
2
Medium Priority
?
545 Views
Last Modified: 2013-12-03
Hi,

I am trying to keep track of users logging on and off the system and also if they are idle for a certain of period of time.
Any idea?
Thanks.
0
Comment
Question by:ewong_111
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 2000 total points
ID: 12350877
You could simply write your own Winlogon Notification Package - see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthn/security/winlogon_notification_packages.asp ("Winlogon Notification Packages"). It basically boils down to creating a DLL that has the following functionality

//Event handler for the Winlogon Logon event
VOID WLEventLogon (PWLX_NOTIFICATION_INFO pInfo)
{
    //Print the name of the handler to debug output.
    //You can replace this with more useful functionality.
    OutputDebugString (TEXT("NOTIFY:  Entering WLEventLogon.\r\n"));
}

//Event handler for the Winlogon Logoff event.
VOID WLEventLogoff (PWLX_NOTIFICATION_INFO pInfo)
{
    //Print the name of the handler to debug output.
    //You can replace this with more useful functionality.
    OutputDebugString (TEXT("NOTIFY:  Entering WLEventLogff.\r\n"));
}

and is registered with the system under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify

DllName = mynotifdll.dll
Logon = "WLEventLogon"
Logoff = "WLEventLogoff"

NOTE that the function names are arbitrary.
0
 
LVL 2

Author Comment

by:ewong_111
ID: 12351071
Thanks a million.. you are always so quick and percise
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question