Code in getting the windows user's fullname.
Dim strComputer As String
Dim strUserName As String
Dim objUser As Object
strComputer = "ComputerName"
strUserName = "UserName
Set objUser = GetObject("WinNT://" & strComputer & "/" & strUserName)
msgbox objUser.FullName
This is also applicable to vb.net.
Dim strComputer As String
Dim strUserName As String
Dim objUser As Object
strComputer = "ComputerName"
strUserName = "UserName
Set objUser = GetObject("WinNT://" & strComputer & "/" & strUserName)
msgbox objUser.FullName
This is also applicable to vb.net.
Comments
Post a Comment