Results 1 to 4 of 4

Thread: A network question

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2002
    Location
    Earth
    Posts
    171

    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

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Apr 2002
    Location
    Earth
    Posts
    171
    Hope no body has gone through the same requirement..

  3. #3
    Lively Member
    Join Date
    Jul 2003
    Location
    Kuala Lumpur (Malaysia)
    Posts
    92

    Smile

    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.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Apr 2002
    Location
    Earth
    Posts
    171
    A big tks

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