Reads the name of a subkey according to its instance.
RegEnumKey ( "keyname", instance )
| keyname | The registry key to read. |
| instance | The 1-based key instance to retrieve |
| Success: | Returns the requested subkey name.. |
| Failure: | Returns an empty string and sets @error to: |
| 1 if unable to open requested key | |
| 2 if unable to open requested main key | |
| 3 if unable to remote connect to the registry | |
| -1 if unable to retrieve requested subkey (key instance out of range) |
For $i = 1 To 10
Local $var = RegEnumKey("HKEY_LOCAL_MACHINE\SOFTWARE", $i)
If @error <> 0 Then ExitLoop
MsgBox(4096, "SubKey #" & $i & " under HKLM\Software: ", $var)
Next