Get Windows User Full Name in VB 6

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.

Comments

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>