Click to See Complete Forum and Search --> : Getting current user's Full Name
dannerbo
Mar 26th, 2006, 07:45 PM
I know how to get the logged in user name, but how would one get the actual name associated with the logged in user?
ex:
username - domain\jdoe
full name - john doe
how does one get the full name?
{FPP}
Mar 26th, 2006, 09:00 PM
Do you mean like who the system is registered to? If not im not sure what you mean, if you already got the user name...
Kasracer
Mar 26th, 2006, 10:57 PM
What do you mean by full name? When you create an Account in Windows, you specify the user name and what level of access you want them to have and that's it. There is no full name saved.
If you're talking about converting jdoe into John Doe... well that's impossible because that could also mean Jack Doe, Jammie Doe, etc... You also can't be sure a user name is the first initial and the last name (Mine is only my first name).
RobDog888
Mar 26th, 2006, 11:10 PM
When your part of a domain your user account has several fields and properties available that a local one doesnt have.
Shuja Ali
Mar 27th, 2006, 01:10 AM
I know how to get the logged in user name, but how would one get the actual name associated with the logged in user?
ex:
username - domain\jdoe
full name - john doe
how does one get the full name?You will have to WMI to get this information. Set a reference to System.Management.DLL and then try to use Win32_UserAccount Class (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_useraccount.asp) to get the desired information.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.