Solved

Trap domain Login/Logoff events

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

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
String manipulation in Visual Basic 7 62
bit defender blocks good applications 2 94
IF ELSE Statement in Excel Macro VBA 16 64
Export Data to Different .csv Files 26 105
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…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
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…

777 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