Ummmm .....
?GetEnv("userprofile")
?GetEnv("systemdrive")
>No registry read function is going to return that string with the parameter evaluated. What you got returned is exactly what is in that reg key, and that is what those functions do. What you need is something that will then evaluate %USERPROFILE% and return that string.
>
>Look through the registry for the ProfileList data item. On my Win2k PC it is HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList
>
>Under that are profiles that will have the path. Problem is you have to start digging really deep to see which profile to get the path from. Then you have to figure out the %SystemDrive% parameter.
>
>>Hi everybody,
>>
>>I want to read key values in the registry. I did it in VB and it worked great. However, when I used registry.prg from
http://www.west-wind.com/files/registry.zip: The following function:
>>
>>oRegistry.ReadRegistryString(HKEY_CURRENT_USER,;
>> "Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders",;
>> "Personal")
>>
>>Returned:
>>“%USERPROFILE%\My Documents”
>>
>>It was supposed to return the real path to the “My Document” folder. How can I fix that? Are there any better functions for reading registry in VFP 6?
>>
>>Thank you,
>>Ali