Click here to return to the KiXtart HelpDesk main page...

KiXtart 2001 Manual

EnumKey( )

Action: Allows you to list 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.


A numeric value representing the position of the subkey whose name you want to discover. Zero (0) represents the first subkey in the key.

0 Function returns a string representing the subkey in the specified key
259 Subkey does not exist
Error code Function failed.
See Also: EnumValue( )

$Index = 0
$KeyName = ENUMKEY("HKEY_CURRENT_USER\Console\", $Index)
If @ERROR = 0
  ? "Name found: $KeyName"
  $Index = $Index + 1
  goto Loop1