enumValueNames

enumValueNames

Enumerates the value of a given key.

Method of

WinReg object

Syntax

String enumValueNames ( String key, int subkeyIndex );

Parameters

The enumValueNames method has the following parameters:

key
The key path to the appropriate location in the key hierarchy, such as "Software\\Netscape\\Navigator\\Mail".
subkeyIndex
An integer representing the 0-based index of the key value being sought.

Returns

The value of the key as a string if it succeeded; NULL if the referenced subkey does not exist.

Description

enumValueNames can be used to iterate through the values for a given key. The following brief example retrieves a key value using this method.

var winreg = getWinRegistry();
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
v1 = winreg.enumValueNames("SOFTWARE\\Mozilla\\", 0);
logComment("The first subkey value of the Mozilla key: " + v1)

Document Tags and Contributors

 Last updated by: Sheppy,