|
-
Nov 19th, 2002, 02:19 AM
#1
Thread Starter
New Member
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
-
Nov 19th, 2002, 12:42 PM
#2
Hyperactive Member
for a part of your Question..
for getting the list of users in a domain using ADSI ..
VB Code:
''Add Active DS Type Library in the REferences
Private Sub Form_Load()
cboDomain.AddItem strLocalSysName ''local system name
Dim namespace As IADsContainer
Dim domain As IADs
'Loads all the current domains
Set namespace = GetObject("WinNT:")
For Each domain In namespace
cboDomain.AddItem domain.Name
Next
End Sub
Private Sub cboDomain_Click()
On Error Resume Next
List1.Clear
cboUser_Group.Clear
Dim container As IADsContainer
Dim containername As String
containername = cboDomain.Text
Set container = GetObject("WinNT://" & containername)
container.Filter = Array("User")
Dim user As IADsUser
For Each user In container
List1.AddItem user.Name
Next
container.Filter = Array("Group")
Dim group As IADsGroup
For Each group In container
cboUser_Group.AddItem group.Name
Next
End Sub
Private Sub cboUser_Group_Click()
On Error Resume Next
List1.Clear
Label3.Caption = "Members of " & cboUser_Group.Text
frmpleasewait.Show
DoEvents
Dim group As IADsGroup
Dim groupname As String
Dim groupdomain As String
groupname = cboUser_Group.Text
groupdomain = cboDomain.Text
Set group = GetObject("WinNT://" & groupdomain & "/" & groupname & ",group")
For Each member In group.Members
List1.AddItem member.Name
Next
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|