Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Working the registry
Message
 
À
18/10/2004 14:42:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00952391
Message ID:
00952757
Vues:
10
Hi Don,

Here are some examples I got from Ken mcGinnis. Hope they help.

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)

Function DeleteRegistry
Lparameters tcRegistryKey
* tcRegistryKey = registry key to delete
* ex: "HKCC\System\CurrentControlSet\Control\Print\Printers\Default"
oShell = Createobject("WScript.Shell")
lcValue = oShell.RegDelete(tcRegistryKey)
Note: you must delete keys one at a time. In the example above delete in this order:
HKCC\System\CurrentControlSet\Control\Print\Printers\
HKCC\System\CurrentControlSet\Control\Print\
HKCC\System\CurrentControlSet\Control\

Note: the backslash at the end indicates a key (rather than a value)

use the .Regwrite() function to update.

Regards
Stuart Reid

True nobility lies not in being superior to another man, but in being superior to one’s previous self
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform