Solved

Trap domain Login/Logoff events

Posted on 2004-09-22
5
359 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

740 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