Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Working the registry
Message
From
19/10/2004 15:12:22
 
 
To
18/10/2004 14:42:11
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00952391
Message ID:
00952757
Views:
9
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform