Date: Thu, 28 Mar 2024 21:57:01 -0700 (PDT) Message-ID: <425844557.381.1711688221229@wiki.srpcs.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_380_2005685782.1711688221228" ------=_Part_380_2005685782.1711688221228 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
L= ists a key's sub keys.
List =3D SRP_Regis= try("LISTKEYS", Key, ValueName, Value, Error)
The key's list of sub keys, or "" if no sub keys were found or there was= an error.
The Value parameter is treated as a boolean option. Setting Value to 1 w= ill return the sub keys as complete path strings. Setting Value to 0 will r= eturn only the sub keys' names. The default is 0.
If the service returns "", then an error may have occurred. In this even= t, the Error parameter can be one of the following messages:
Error | Description |
---|---|
"" | There was no error. The key was found but has no= sub keys. |
"Failed to open key" | The key could not be opened. |
The LISTKEYS service generates a dynamic array of all sub keys within a = given key. The sub keys are @FM delimited and in no particular order. The f= ormat of the keys depends on the Value parameter. Set it to one to get a li= st of the full key paths:
<1> HKCU\Sof= tware\MyApp\SubKey1 <2> HKCU\Software\MyApp\SubKey2 <3> HKCU\Software\MyApp\SubKey3
Set the Value parameter to 0 or leave it unassigned to get only the sub = key names:
<1> SubKey1 <2> SubKey2 <3> SubKey3
If this service returns "", then use the Error property to determine whe= ther the list is empty due to an error or to the fact that the key has no v= alues.
Us the LI= STVALUES service to get a key's values.
* Get a key's list= of sub keys with full paths List =3D SRP_Registry("LISTKEYS", "HKCU\Software\MyApp", "", 1, Error) EQ 0= then If List EQ "" AND Error NE "" then Msg(@Window, "LISTKEYS Error: ":Error:@FM:@FM:@FM:4) end * Get a key's list of sub keys with names only List =3D SRP_Registry("LISTKEYS", "HKCU\Software\MyApp", "", 0, Error) EQ 0= then If List EQ "" AND Error NE "" then Msg(@Window, "LISTKEYS Error: ":Error:@FM:@FM:@FM:4) end