>George,
>
>Thanks for the information. 'GetSystemDirectory' worked well. I am still puzzled about why getenv('WINDIR') returns empty on a Windows XP system.
>
>Bill Schenck
Bill,
I'd assume it would be because the environment variable wasn't/isn't set in XP. The GETENV() function maps to an API call named GetEnvironmentVariable(). To test this theory, you could try the following
DECLARE INTEGER GetEnvironmentVariable IN Win32API;
STRING @lpName, STRING @lpBuffer, INTEGER nSize
lcname = 'WINDIR'
lnsize = 260
lcbuffer = SPACE(lnsize)
lnsize = GetEnvironmentVariable(@lcname, @lcbuffer, lnsize)
IF lnsize > 0
? LEFT(lcbuffer, lnsize)
ELSE
? lcname + " not found!"
ENDIF
George
Ubi caritas et amor, deus ibi est