Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to read child folder in registry?
Message
 
 
To
20/09/2006 11:07:02
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01155558
Message ID:
01155765
Views:
7
ccHKEY_CURRENT_USER = -2147483647
oReg = NEWOBJECT("Registry", HOME()+"FFC\registry")
lcRegKey = "Software\Microsoft"
DIMENSION laKeyList[1]
* Open or Create registry key 'My Company'
IF oReg.OpenKey(lcRegKey, ccHKEY_CURRENT_USER, .T.) <> 0
  * error
ENDIF

IF oReg.EnumKeys(@laKeyList) <> 0
  * error
ENDIF

DIMENSION laKeyList[ALEN(laKeyList),1]

CREATE CURSOR crsKeyList ("KeyANme" C(100))
APPEND FROM ARRAY laKeyList

* Close key
oReg.closekey()

GO TOP
BROWSE LAST NOWAIT
>The values is in each Product folder (see below), but I just want to read the contents of a parent folder Software. The result must be the child folder names only (Product1, Product2, Product3). Is it possible to read the folder with WScript.Shell or otherwise?
>
>HKEY_USERS
>-.DEFAULT
>--Software
>---Product1
>----name: username, value: xxx
>---Product2
>----name: username, value: yyy
>---Product3
>----name: username, value: zzz
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform