Answer the question
In order to leave comments, you need to log in
How to get user account name?
How to get the user's name?
For example, the username is ivanov_ii, and the start menu says Ivanov Ivan Ivanovich, this is exactly what you need to get.
In Google they say that you need to use LDAP. However, I haven't seen any real examples.
There is this:
hr = ADsGetObject(L"LDAP://CN=computers,DC=mydomain,DC=local", IID_IADsContainer, (void**) &pCont );
(void**) &pCont
Sub asdas()
Set SI_ = CreateObject("ADSystemInfo")
Set Un_ = GetObject("LDAP://" & SI_.UserName)
UZ_ = Un_.DisplayName
msgbox UZ_
End Sub
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question