I have the following code in VBS that works perfectly. it queries AD to get the user full name :
Set objSysInfo = CreateObject("ADSystemInfo")
strUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUser)
strFullName = objUser.Get("displayName")
MsgBox strFullName
i would like to do the same thin but in Foxpro 7. anybody has experience with VFP 7 or 9 ?
sys(0) returns both machine name and user something like
lcMachineUser = sys(0)
lcMachine = LEFT( lcMachineUser, AT( "#", lcMachineUser) -1 )
lcUserName = substr( lcMachineUser, AT( "#", lcMachineUser) +1 )