Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Read registry?
Message
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Miscellaneous
Thread ID:
00880860
Message ID:
00880891
Views:
36
This message has been marked as a message which has helped to the initial question of the thread.
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
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform