473,395 Members | 2,796 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Reading logon/logoff datetime

Hi.

I need to write a service that writes to a database the time of the
logon and logoff of the users. Our users logs on Active Directory and
some can also log as local administrators. The majority of the
workstations are Windows 2000 and some are Windows XP. I am reading
about WMI but have found some limitations when reading the WMI
structures, mainly with Windows 2000.

What is the best way to read logon/logoff information in this scenario?

Thanks,
Robert Scheer

Sep 19 '06 #1
2 1641
if you use .NET 2.0, you can use the Microsoft.Win32.SystemEvents class and
register (and don't forget to unregister, because it's a static event) it's
SessionSwitch event.

http://msdn2.microsoft.com/en-us/lib...ionswitch.aspx

I hope it helps

ThunderMusic

"Robert Scheer" <rb******@my-deja.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
Hi.

I need to write a service that writes to a database the time of the
logon and logoff of the users. Our users logs on Active Directory and
some can also log as local administrators. The majority of the
workstations are Windows 2000 and some are Windows XP. I am reading
about WMI but have found some limitations when reading the WMI
structures, mainly with Windows 2000.

What is the best way to read logon/logoff information in this scenario?

Thanks,
Robert Scheer

Sep 19 '06 #2
Hello Robert,
The best way is to set up the domain accounts to cause an audit event on
logon/logoff. This would write an entry to the NT Event Log whenever someone
logs on or off.

-Boo
Hi.

I need to write a service that writes to a database the time of the
logon and logoff of the users. Our users logs on Active Directory and
some can also log as local administrators. The majority of the
workstations are Windows 2000 and some are Windows XP. I am reading
about WMI but have found some limitations when reading the WMI
structures, mainly with Windows 2000.

What is the best way to read logon/logoff information in this
scenario?

Thanks,
Robert Scheer

Sep 19 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: jeff | last post by:
Hi. I am trying to read addresses from an Exchange 5.5 Global Address Book from an asp.net page. When the page executes the error "Collaboration Data Objects - ]" is generated. Here is the...
7
by: Aarti | last post by:
I have written a windows service that needs to perform certain functions only if a User is logged in. The problem I am running into is that I get an error if the computer is in the process of being...
1
by: Jonas | last post by:
Hi! I'm building an ASP.NET web application that needs an automatic logoff after a specified time out period, forcing the user to enter his/her Windows authentication credentials again. I use...
2
by: Raimund Taschler | last post by:
Hi all, I'm implementing a windows service (running with local system account) which has to do some tasks when users logon/logoff. How can the service register to those logon/logoff-events? I'm...
1
by: hecsan07 | last post by:
Hey I am trying to read the Windows Event Logc. In fact, I am able to read the Event Log. My problem is that I am reading and filtering a large log and it takes a very very very very long time...
0
by: robpimentel | last post by:
Hi, I've been using DB2 for about 1 week, so please bear with me. DB2 Connect Enterprise Edition v8.1 FixPack 5 Windows Server 2003 Standard Edition SP1 Here is an error that continues to...
2
by: Robert Scheer | last post by:
Hi. I need to write a service that writes to a database the time of the logon and logoff of the users. Our users logs on Active Directory and some can also log as local administrators. The...
1
by: =?Utf-8?B?ZGpjYXNlbGV5?= | last post by:
I'm trying to write a service that will sit on the domain controller (or, if this proves to be impossible, to be rolled to all connecting Windows machines). It needs to get notification of each...
2
by: Dan2kx | last post by:
Function LogonLog(OnOff As String) Dim rst As DAO.Recordset If OnOff = "On" Then Set rst = CurrentDb.OpenRecordset("tblLogonLog", dbOpenDynaset, dbAppendOnly) rst.AddNew ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.