>How can I return a value that is held in a System Environment variable? I need to get the value in Username.
>
Judy,
GETENV() can return this information provided the computer is logged into a network. So can SYS(1). However, best is probably
DECLARE INTEGER WNetGetUser IN Win32API;
STRING @lpName, STRING @lpUserName,;
INTEGER @lpnLength
lcname = "F:"
lcuser = SPACE(260)
lnsize = LEN(lcuser)
IF WNetGetUser(@lcname, @lcuser, @lnsize) = 0
? LEFT(lcuser, lnsize)
ENDIF
George
Ubi caritas et amor, deus ibi est