Solved

Trap domain Login/Logoff events

Posted on 2004-09-22
5
361 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
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…

718 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