Results 1 to 2 of 2

Thread: Active Directory LDAP components

  1. #1

    Question Active Directory LDAP components

    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.

  2. #2
    Moderator VBAX Guru Ken Puls's Avatar
    Aug 2004
    Nanaimo, BC, Canada
    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 which was looking for a way to kill a specific process.

    The relevant part from the second post is:
    [vba] 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 [/vba]

    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.

    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts