RegistryKeys PowerScript function
Description
Obtains a list of the keys that are child items (subkeys)
one level below a key in the Windows system registry.
Syntax
|
1 |
<span>RegistryKeys</span> ( <span>key</span>, <span>subkeys</span><span></span> ) |
|
Argument |
Description |
|---|---|
|
key |
A string whose value names the key in To uniquely identify a key, specify the list of parent keys |
|
subkeys |
An array variable of strings in which If the array is variable size, its upper bound will reflect If the array is fixed size, it must be large enough to hold |
Return Values
Integer. Returns 1 if it succeeds and
-1 if an error occurs.
Usage
For more information about entries in the system registry,
see RegistrySet.
Examples
This example obtains the subkeys associated with
the key HKEY_CLASSES_ROOTMyApp.
The subkeys are stored in the variable-size array ls_subkeylist:
|
1 |
string ls_subkeylist[] |
|
1 |
integer li_rtn |
|
1 |
li_rtn = <span>RegistryKeys</span>("HKEY_CLASSES_ROOTMyApp", & |
|
1 |
ls_subkeylist) |
|
1 |
IF li_rtn = -1 THEN |
|
1 |
... // Error processing |
|
1 |
END IF |