Chuck,
Thanks for your help. Based on those links I was able to come up with the following solution:
* Get the current Windows, System and Program Files directories
DECLARE INTEGER SHGetFolderPath IN SHFOLDER.DLL ;
INTEGER hwndOwner, ;
INTEGER nFolder, ;
INTEGER hToken, ;
INTEGER dwFlags, ;
STRING @ pszPath
DECLARE INTEGER GetActiveWindow IN WIN32API
#DEFINE CSIDL_PROFILE 40
lcPath = REPL(CHR(0),261)
=SHGetFolderPath(GetActiveWindow(),CSIDL_PROFILE,0,0,@lcPath)
Of course, Dragan had a one line solution to the problem.
Thanks to all of you for your assistance.
Lamar
? 'Windows folder:',LEFT(lcPath,AT(CHR(0),lcPath)-1)
>>for the current logged in user. We are using VFP7 SP1 on boxes running WinXP Pro. Is there a VFP function or API call that returns folder location?
>>
>>TIA
>
>Look at FAQ 16115
>
http://www.levelextreme.com/wconnect/wc.dll?FournierTransformation~2,84,14,16115>
>Or if you want to use Shell Api you can look at FAQ 16022
>
http://www.levelextreme.com/wconnect/wc.dll?FournierTransformation~2,84,14,16022
Lamar Glover
DP Manager, Southeastern Apparel, Inc.