|
-
Mar 26th, 2006, 08:45 PM
#1
Thread Starter
New Member
Getting current user's Full Name
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?
-
Mar 26th, 2006, 10:00 PM
#2
Lively Member
Re: Getting current user's Full Name
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...
-
Mar 26th, 2006, 11:57 PM
#3
Re: Getting current user's Full Name
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).
-
Mar 27th, 2006, 12:10 AM
#4
Re: Getting current user's Full Name
When your part of a domain your user account has several fields and properties available that a local one doesnt have.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 27th, 2006, 02:10 AM
#5
Re: Getting current user's Full Name
 Originally Posted by dannerbo
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 to get the desired information.
Use [code] source code here[/code] tags when you post source code.
My Articles
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|