The regGetKeyValues function returns a two-dimensional array with name, actual value, and type of registry values for a key on a local or remote system. The returned array can be passed to regSetKeyValues() to copy value settings from one system to another.
The function has the following syntax:
regGetKeyValues(sKey)
Specifies the registry key.
The function returns a two-dimensional array. Each top-level element holds a three element sub-array containing a string representing the value name, a polymorphic value for the setting, and an integer for the value type. The type of registry value determines the type of the return value.
If the function fails, it raises an exception.
Examples
Retrieve and display value information for the key HKLM\Software\ACME\Settings:
arr = regGetKeyValues("HKLM\\Software\\ACME\\Settings"); l = arr.length; for(i=0; i < l; i++) { ? "Name: ", arr[i][0] ? "Value:", arr[i][1] ?? "Type: " switch(arr[i][2]) { case REG_SZ: ? "REG_SZ" break; case REG_EXPAND_SZ: ? "REG_EXPAND_SZ" break; case REG_BINARY: ? "REG_BINARY" break; case REG_DWORD: ? "REG_DWORD" break; case REG_MULTI_SZ: ? "REG_MULTI_SZ" break; default: ? "Unknown" } }
Get values from remote system client8 and apply them to remote system client9:
arr = regGetKeyValues("client8::HKLM\\Software\\ACME\\Settings"); regSetKeyValues("client9::HKLM\\Software\\ACME\\Settings", arr);
Copyright © 2013 CA. All rights reserved. |
|