Results 1 to 2 of 2

Thread: Finding EXE / COM Files

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2002
    Location
    Germany
    Posts
    7

    Question Finding EXE / COM Files

    Hello,

    I need to make a program which resides in the Network server and keep a track of who ever logs into the server, then from his login name finds his machine name, goes into the hard disk and finds all of the EXE and COM files in that machine.

    The other way can be, instead keeping an eye on the login, it checks all of the active users on ther server and one by one goes into each machine and find the EXE and COM files.

    So basically, I need two routines, One to find the network users and reaching their computers and the other to find their files.

    Please help me in any way you can. With any routine of yours, some sample code, some API calls any thing.

    Best regards,

    Bilal Khokhar
    Application programmer

  2. #2
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    India
    Posts
    342

    for a part of your Question..

    for getting the list of users in a domain using ADSI ..

    VB Code:
    1. ''Add Active DS Type Library in the REferences
    2.  
    3. Private Sub Form_Load()
    4. cboDomain.AddItem strLocalSysName ''local system name
    5. Dim namespace As IADsContainer
    6. Dim domain As IADs
    7.  'Loads all the current domains
    8. Set namespace = GetObject("WinNT:")
    9.  
    10. For Each domain In namespace
    11. cboDomain.AddItem domain.Name
    12. Next
    13. End Sub
    14.  
    15. Private Sub cboDomain_Click()
    16. On Error Resume Next
    17. List1.Clear
    18. cboUser_Group.Clear
    19.  
    20. Dim container As IADsContainer
    21. Dim containername As String
    22. containername = cboDomain.Text
    23. Set container = GetObject("WinNT://" & containername)
    24.  
    25. container.Filter = Array("User")
    26. Dim user As IADsUser
    27. For Each user In container
    28. List1.AddItem user.Name
    29. Next
    30.  
    31. container.Filter = Array("Group")
    32. Dim group As IADsGroup
    33. For Each group In container
    34. cboUser_Group.AddItem group.Name
    35. Next
    36.  
    37. End Sub
    38.  
    39. Private Sub cboUser_Group_Click()
    40. On Error Resume Next
    41. List1.Clear
    42. Label3.Caption = "Members of " & cboUser_Group.Text
    43. frmpleasewait.Show
    44. DoEvents
    45.  
    46. Dim group As IADsGroup
    47. Dim groupname As String
    48. Dim groupdomain As String
    49.  
    50. groupname = cboUser_Group.Text
    51. groupdomain = cboDomain.Text
    52. Set group = GetObject("WinNT://" & groupdomain & "/" & groupname & ",group")
    53.  
    54. For Each member In group.Members
    55. List1.AddItem member.Name
    56. Next
    57. End Sub
    ksm

Posting Permissions

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



Click Here to Expand Forum to Full Width