I have found the following code to get a domain user's full name (rather than just their logon user name).
Can this be done with the Door library? If so, would someone translate it for me, please?
B4X:
Function GetUserName() As String
Dim DomainUser As String = System.Security.Principal.WindowsIdentity.GetCurrent.Name.Replace("\", "/")
Dim ADEntry As New System.DirectoryServices.DirectoryEntry("WinNT://" & DomainUser)
Return ADEntry.Properties("FullName").Value
End Function
I don't thing that it's possible with Door library...
I can do this in c# and if it work I send you the DLL Lib with the Code Source...
Note:
It's just for Desktop and not for PPC...
Sorry, I can't do it... I didn't find any information about Full Name...
I can just get the UserName but not the FullName... Where do you set the FullName on Windows?
I'm not sure if available for local accounts as well; but when you log on to a Windows Domain on a corporate network, your username has a FullName and Description associated with it.
For example, I may log on with a username of zdiode01 and my full name will be Zener Diode.