Action |
Lists the names of the subkeys contained in a registry key or subkey.
Syntax |
ENUMKEY ("subkey", index)
Parameters |
Subkey
Specifies the key or subkey for which you want to enumerate the subkeys.
Index
A numeric value representing the position of the subkey whose name you want to discover. Zero (0) represents the first subkey in the key.
Returns |
0 |
Function returns a string representing the subkey in the specified key |
Error code |
Function failed |
259 |
Subkey does not exist |
Example |
$Index = 0
:Loop1
$KeyName = ENUMKEY("HKEY_CURRENT_USER\Console\ ", $Index)
If @ERROR = 0
? "Name found: $KeyName"
$Index
= $Index + 1
goto
Loop1
Endif