|
-
Sep 18th, 2003, 03:39 AM
#1
Thread Starter
Addicted Member
A network question
Hello everybody,
I am new to dot net and my query is that do we have any built in class for retrieving the user names currently logged in to a network domain. Also how to send a message using VB.net to the users.thanks in advance
-
Sep 18th, 2003, 04:21 AM
#2
Thread Starter
Addicted Member
Hope no body has gone through the same requirement..
-
Sep 18th, 2003, 04:40 AM
#3
Lively Member
public Function GetDomainAccountNames( _
ByVal sDomainName As String) _
As System.Collections.Hashtable
' Parameters: sDomainName - Domain to check
' Returns: Hashtable containing all properties and
' values
Dim MyQuery As Management.ManagementObjectSearcher = _
New Management.ManagementObjectSearcher( _
"SELECT * FROM Win32_Account WHERE Domain='" & _
sDomainName & "'")
Dim MyQueryResults As Management.ManagementObjectCollection = _
MyQuery.Get()
Dim MyObject As Management.ManagementObject
Dim returnTable As New Hashtable()
Dim intcounter As Integer = 0
For Each MyObject In MyQueryResults
returnTable.Add(intcounter, MyObject.Item("Name"))
intcounter = intcounter + 1
Next
Return returnTable
End Function
for sending event message try to use the "Net Send" command.
-
Sep 18th, 2003, 04:49 AM
#4
Thread Starter
Addicted Member
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
|