enumKeys
Enumerates the registry subkeys for the given key.
Method of
Syntax
String enumKeys (
String key,
int subkeyIndexParameters
The
enumKeysmethod has the following parameters:
keyThe key path to the appropriate location in the key hierarchy, such as " Software\\Netscape\\Navigator\\Mail".subkeyIndexAn integer representing the 0-based index of the subkey being sought. Returns
The name if it succeeded;
NULLif the referenced value does not exist.Description
enumKeyscan be used to iterate through the subkeys at a given key location. The following example shows how to useenumKeysto find the plugins subdirectory below the various Mozilla-based browser installations.var winreg = getWinRegistry(); winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE); var index = 0; var baseKey = "Software\\Mozilla"; while ( (MozillaVersion = winreg.enumKeys(baseKey,index)) != null ) { logComment("MozillaVersion = " + MozillaVersion); subkey = baseKey + "\\" + MozillaVersion + "\\Extensions"; pluginsDir = winreg.getValueString ( subkey, "Plugins" ); if ( pluginsDir ) logComment("pluginsDir = " + pluginsDir); else logComment("No plugins dir for " + baseKey + "\\" + MozillaVersion); index++; }
| Netscape Communications devedge.netscape.com |