>>>Hi Steve,
>>>Try this:
>>>
>>>Declare Long GetUserNameEx in Secur32 ;
>>> Long NameFormat, String @lpBuffer, Long @nSize
>>>
>>>nBufLen = 260
>>>cAccountName = repl( chr(0), nBufLen )
>>>If (GetUserNameEx( 3, @cAccountName, @nBufLen ) != 0)
>>> ? 'Friendly Account Name: ' + left( cAccountName, nBufLen-1 )
>>>else
>>> ** GetLastError() return 1332 if the account name was not changed from the original one
>>>endif
>>>
>>>Clear Dlls GetUserNameEx
>>>
>>
>>That's it. It works!!!
>>In the "else" above, you could use SYS(0) method so that the function would return a value not empty.
>>
>
>Yup, that's right! However I suggest you do the GetLastError() in case it return ERROR_MORE_DATA (need longer buffer) or an error other than above
>
>>Thank you and to all the others.
>
>You're welcome :)
>Regards
Forgot to mention that you must relog in once to take effect or it would return Steve again.