>>>>objShell = CreateObject("WScript.Shell") >>>>strClient = objShell.ExpandEnvironmentStrings("%clientname%") >>>>? strClient >>>>>>>>
* GET THE USER LOGIN NAME TUSER_LOGIN_NAME = ALLTRIM( SUBSTR( SYS(0), AT( "#", SYS(0) ) + 1 ) ) * CREATE AN OBJECT REFERENCE TO THE USER LOGIN ACCOUNT TRY TOBJ_Windows_User = getobject( "WinNT://" + Getenv("USERDOMAIN") + "/" + m.TUSER_LOGIN_NAME + ",User" ) CATCH TOBJ_Windows_User = .F. ENDTRY * GET THE USERS FULL NAME AND DESCRIPTION IF VARTYPE( TOBJ_Windows_User ) = "O" TUSER_FULL_NAME = TOBJ_Windows_User.FullName TUSER_DESCRIPTION = TOBJ_Windows_User.Description ELSE TUSER_FULL_NAME = "?" TUSER_DESCRIPTION = "?" ENDIFNB: The above is relatively slow (a couple of seconds) and so our code tests to see whether the login full name is empty in our file and only attempts the above if empty. In other words, we run this code only once for a user and then not again.