PDA

View Full Version : Active Directory LDAP components



Mr Doubtfire
05-04-2005, 10:15 AM
I would like to obtain/query the Windows 2000 server users activities. Once I find (eg. c:\program files\application\app1.exe) an application is used during a certain period (eg. 1:00-5:00AM) I would kill that file/session to discontinue the activities. (just like going to the Computer Management)
Could anyone tell me the name of the "References" I have to add?
If you guys have experienced, please do not hesitate to provide the code.
Thanks!

Ken Puls
05-04-2005, 10:32 AM
Hi there,

I can give you two links that may get you started:

Check Process checks if a certain process is running and uses API calls. No references required.

The submission there was based on this post (http://www.vbaexpress.com/forum/showthread.php?t=2438) which was looking for a way to kill a specific process.

The relevant part from the second post is:
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = vbAppWindows Then
If CheckProcess("wfica32.exe") Then
MsgBox "Please logout of citrix!"
Cancel = 1
End If
End If
End Sub

You'd want to take the info from the KB entry. Copy the above in and change the wfica32.exe to the name of the process you want to kill, and you should be well on your way.

HTH,