Reads the name of a subkey according to it's instance.
RegEnumKey ( "keyname", instance )
Parameters
keyname | The registry key to read. |
instance | The 1-based key instance to retrieve |
Return Value
Success: | Returns the requested subkey name.. |
Failure: | Returns "" and sets the @error flag: |
1 if unable to open requested key | |
-1 if unable to retrieve requested subkey (key instance out of range) |
Remarks
A registry key must start with "HKEY_LOCAL_MACHINE" ("HKLM") or "HKEY_USERS" ("HKU") or "HKEY_CURRENT_USER" ("HKCU") or "HKEY_CLASSES_ROOT" ("HKCR") or "HKEY_CURRENT_CONFIG" ("HKCC").
Related
RegEnumVal, RegDelete, RegWrite, StringSplit
Example
$var = RegEnumKey("HKEY_LOCAL_MACHINE\SOFTWARE", 1)
MsgBox(4096, "First SubKey under HKLM\Software: ", $var)
$var = RegEnumKey("HKEY_LOCAL_MACHINE\SOFTWARE", 2)
MsgBox(4096, "Second SubKey under HKLM\Software: ", $var)