Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get value out of registry if know the key
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00700638
Message ID:
00702565
Views:
11
>How do I get a value out of the registry if I know the key? Specifically, I need to get the default form class/classlib. I know the registry key. Is there another way than doing an explicit search of the registry?
>
No one mentioned the WSH. (George?) I think that is the easiest way:

Function readregistry
Lparameters tcRegistryKey
* tcRegistryKey = registry key to read
* ex: "HKCC\System\CurrentControlSet\Control\Print\Printers\Default"
* These abbreviations may be used:
oShell = Createobject("WScript.Shell")
lcValue = oShell.RegRead(tcRegistryKey)

Function writeregistry
Lparameters tcRegistryKey, tcValue
oShell = Createobject("WScript.Shell")
lcValue = oShell.RegWrite(tcRegistryKey, tcValue)

Dr. Ken A. McGinnis
Healthcare software design
Previous
Reply
Map
View

Click here to load this message in the networking platform