Solved

Trap domain Login/Logoff events

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…

839 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