Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trying to read registry value
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00705790
Message ID:
00706868
Views:
38
This message has been marked as the solution to the initial question of the thread.
I solved this using WSH instead

lbTest = WshShell.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook\Categories\MasterList")

>I'm having problems reading a registry value.
>
>At
>HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook\Categories
>Is MasterList which has a hex value
>
>Using the code below, the GetKeyValue method always returns 234 instead of putting the value into lcUser. Any ideas what I am doing incorrectly? IsKey() says the key is valid.
>
>
>#DEFINE HKEY_LOCAL_USER -2147483647
>loReg = NEWOBJECT("Registry", HOME() + "ffc\registry")
>? loReg.iskey('Software\Microsoft\Office\10.0\Outlook\Categories',HKEY_LOCAL_USER)
>IF loReg.OpenKey('Software\Microsoft\Office\10.0\Outlook\Categories',HKEY_LOCAL_USER) = 0
>	lcUser = SPACE(100)
>	? loReg.GetKeyValue('MasterList',&lcUser)
>ENDIF
>
Previous
Reply
Map
View

Click here to load this message in the networking platform