IApplication.RegistryPath

Syntax

RegistryPath([SubVersion: Boolean = False]): String;

Parameters

SubVersion. Indicates whether the path is obtained taking into account main application version.

Description

The RegistryPath property returns the path to application settings in the registry.

Comments

The returned oath does not contain name of the main registry section, which can store settings. To create the full path, which contains settings, one should specify the required section in the code: HKEY_CURRENT_USER to work with current user settings or HKEY_LOCAL_MACHINE to work with all user settings.

Various settings that can be obtained or changed in the registry are given in the System Registry Settings section. Further work with the settings is available via the use of resources of the Registry assembly.

Example

Add a link to the Host system assembly.

Sub UserProc;
Var
    App: IApplication;
    Version: IApplicationVersion;
Begin
    App := Application.Instance;
    Version := New ApplicationVersion.Create;
    Debug.WriteLine("General settings of all users: " + "[HKEY_LOCAL_MACHINE\" + App.RegistryPath + ']');
    Debug.WriteLine("General settings for version " + Version.ShortDescription + ": [HKEY_LOCAL_MACHINE\" + App.RegistryPath(True) + ']');
End Sub UserProc;

After executing the example the development environment console displays full registry paths with general settings of all users and users of the current platform version.

See also:

IApplication