Lists a key's values.
Syntax
List = SRP_Registry("LISTVALUES", Key, ValueName, Value, Error)
Returns
The key's list of values, or "" if no values were found or there was an error.
Value
The Value parameter is not used by this service.
Errors
If the service returns "", then an error may have occurred. In this event, the Error parameter can be one of the following messages:
Error | Description |
---|---|
"" | There was no error. The key was found but has no values. |
"Failed to open key" | The key could not be opened. |
Remarks
The LISTVALUES service generates a dynamic array of all values within a given key. The values are @FM delimited and in no particular order. If this service returns "", then use the Error property to determine whether the list is empty due to an error or to the fact that the key has no values.
Use the LISTKEYS service to a get the list of sub keys.
Example
* Get a key's list of values List = SRP_Registry("LISTVALUES", "HKCU\Software\MyApp", "", "", Error) EQ 0 then If List EQ "" AND Error NE "" then Msg(@Window, "LISTVALUES Error: ":Error:@FM:@FM:@FM:4) end