RegQueryKey

Returns subkeys of the specified key.

Syntax:

RegQueryKey( handle, index )

Parameters:

(i) handle handle to a registration database key.

(i) index zero-based index into list of subkeys.

Returns:

(s) name of desired subkey.

 

Use this function to enumerate the subkeys of a desired key. The first subkey is referenced by index number 0, the second key by 1, and so on. If the key does not exist, a null string will be returned.

Windows Vista/2008 and newer: This function may require an Administrator level account, if it attempts to access protected registry keys: HKEY_LOCAL_MACHINE  or HKEY_CLASSES_ROOT.

Example:


For x=0 To 999
   a=RegQueryKey(@REGMACHINE, x)
   Display(2, "HKEY_LOCAL_MACHINE subkey number %x%", a)
   If a=="" Then Break
Next
See Also:

RegOpenKey, RegCreateKey, RegCloseKey, RegDeleteKey, RegEntryType, RegSetValue, RegQueryKeys, RegQueryValue, and the section on Registration Database Operations