Solved

Trap domain Login/Logoff events

Posted on 2004-09-22
5
354 Views
Last Modified: 2010-08-05
is there anyway I can trap user Login/logoff events on a domain controller and/or workstation?

I am using W2K server with Active Directory. Workstations are a mix of XP prof and Win2K.

I have looked at using Audit and the Event log but the requirement is for a "real time" response to a login/logoff. Anyway the Event log does not report a log off.

Any suggestions welcome....  

/Richard
0
Comment
Question by:RichardCorrie
  • 3
5 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 12121353
I don't know of a way to "trap" the event itself.  Of course the login event triggers the running of a login script and you can also have a logout script which can trigger action as the user logs off (see link below).  So you could trigger some sort of action using those.  You could also use the event log and have your program check it for login/logout events every second, taking action when it found one.  The third approach is to configure a program to run each time the user logs in.  Set the program so it isn't generally visible to the user, making it tougher for them to kill it.  Put code in the program's Terminate event and take action as it is shutting down, which should only occur as the user logs off/shuts down the machine.  Without knowing what it is you plan to do when the event occurs I don't know fi these are viable options or not.

http://www.microsoft.com/technet/archive/community/columns/tips/2kscript.mspx
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 12122201
Read the System log.
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 12122307
Here is some ASP source code. It wont be difficult porting it to VB.

http://www.4guysfromrolla.com/webtech/chapters/ASPNET2/ch02.9.shtml
0
 
LVL 19

Accepted Solution

by:
RanjeetRain earned 500 total points
ID: 12122356
0
 
LVL 10

Author Comment

by:RichardCorrie
ID: 12378978
code links were good but not really what I am looking for....

Thanks for your time
/richard
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now