Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get value out of registry if know the key
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00700638
Message ID:
00702565
Vues:
12
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform