简体   繁体   中英

Retrieve a user's First and Last Name, given its login name, inside a windows server domain

Given that I am on a workstation, that is inside a Windows Server domain. In my data, I have the login name of the operator who has created the data.

When I print a presentation of this data, I want to display the first and last name of this operator, which may be logged on another workstation of the domain... or even could even not be logged at all.

Do you have any clue if I can acheive this, and how ?

In advance thx.

The Win32_UserAccount WMI class, has a FullName property which sounds like it might be a possibility.

Maybe a query like:

SELECT * FROM Win32_UserAccount WHERE Name='username'

And then you can query the results from that query for the FullName s.

This MSDN page has information about using WMI from C++: WMI C++ Application Examples

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM