• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 192
  • Last Modified:

user login from which computer name

In a Windows 2000 domain, is there a way for me to check the users currently are login from which Computer name. Currently I am also trying to write a program either using VB.Net or VB to see the user is currently login from which Computer. This will help me locate the users computer faster and more efficient for troubleshooting from remote. Else I will have to guide the user how to find out thier Computer name or IP addresss. Thanks
0
stchow1
Asked:
stchow1
1 Solution
 
cwi2kCommented:
hi im not sure about checking computers for users that are logged in but if you put a program on each computer with a label that has the computer name you can do it like this

Label1.Text = Environment.MachineName()

this will display the computer name using netbios

thats in vb.net

if you are using vb you can use winsock (which i dont think is on vb.net to get the information)

Label1.Caption = Winsock1.LocalHostName

put a winsock control onto your form with the name winsock1

hope that helps
0
 
Fahad MukhtarDistinguished EngineerCommented:
The following code will popup the computer names in the network.....

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
        Dim root As DirectoryEntry = New DirectoryEntry("WinNT:")
        Dim dDom As System.DirectoryServices.DirectoryEntry
        Dim dPC As System.DirectoryServices.DirectoryEntry
        For Each dDom In root.Children

            For Each dPC In dDom.Children
                If dPC.SchemaClassName = "Computer" Then
                    MessageBox.Show(dDom.Name + "/" + dPC.Name)
                End If
            Next
        Next
End Sub


..............for complete net send application in VB.NET, download the app from here:
http://www.vbfrance.com/article.aspx?Val=8391
0
 
Fahad MukhtarDistinguished EngineerCommented:
0
 
stchow1Author Commented:
If I know the user login ID, is there a way for me to find out, currently the user ID is login from which Computer name or IP address on my Workstation. I am trying to write a VB.Net or VB program to get this info. Preferably not to install any software on the user PC. I am supporting users from various country and it may not be pratical. Or you suggest an alternative way so I may have the info on my Workstation.  
0
 
BradB3030Commented:
is Environment.User.Identity.Name what you're looking for?

When you actually put it on the Web, you'd need to turn Anonymous Access off and turn on something like Windows Authentication.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now