Get_Registry_Root
Obsolete
This command is obsolete. Use the cRegistry class for accessing the Windows Registry in DataFlex.
Purpose
To return the current settings of the registry root and branch that DataFlex uses to search the registry.
Syntax
Get_Registry_Root To {Root} {Branch}
Argument Explanation
- sRoot: The name of a root in the Windows registry. This may be one of the following values:
- HKEY_CLASSES_ROOT: COM class and file type information. Sub-tree of HKEY_LOCAL_MACHINE.
- HKEY_CURRENT_USER: Sub-tree of HKEY_USERS which corresponds to the information about the current user. This is where user-specific information for an application can be stored.
- HKEY_LOCAL_MACHINE: This is where all global (not user specific) machine information is stored. This tree contains the Software branch where most applications store their global information. This is the default setting for DataFlex.
- HKEY_USERS: This is where all user-specific information is stored. The sub-tree for the current user is better accessed through HKEY_CURRENT_USER.
- HKEY_PERFORMANCE_DATA: Not generally used by applications.
- HKEY_CURRENT_CONFIG: Not generally used by applications.
-
HKEY_DYN_DATA: Not generally used by applications.
-
sBranch: The name of a branch under root in the Windows registry. The most common branch for applications is "Software".
What It Does
Returns the registry root and branch settings. Use Set_Registry_Root to change the registry root and/or branch.
Example
Integer iRegistryRoot // Integers (defined in registry.pkg)
String sRegistryBranch // String value that is top branch.
// Set up registry to access user preferences.
Set_Registry_Root to HKEY_USERS "Default"
// Show that it has been changed.
Get_Registry_Root to iRegistryRoot sRegistryBranch
Showln "Root: " iRegistryRoot " Branch: " sRegistryBranch