DataLab is a compact statistics package aiming at exploratory data analysis. Please visit the DataLab Web site for more information....


GetRegValue

Declaration: GetRegValue (RootKey: TRegRootKey; SubKey, ValueID: string): string;
The function GetRegValue reads a value of the Windows registry. The parameter RootKey defines the root key and the parameter SubKey specifies the key (including its path) used within the branch of the root key. The parameter ValueID specifies the value to be retrieved.

The function returns the registry value always as a string, even if the value is stored as an integer. If the type of the stored value is unknown or not supported then the function returns the string 'ERROR (unknown type)'. If the value does not exist an empty string is returned.

Example: The statement
GetRegValue (hkeyCurrentUser, '/Software/MyProduct/Customization/BgndColor');
returns the value named BgndColor which is stored under the registry key HKEY_CURRENT_USER/Software/MyProduct/Customization.