1. Script object OG.Registry

    Article: AN0002187Updated:

    This object offers functions for work with Windows registry.

    Script functions

     

    Name Description
    string GetValueSZ(string path, string valueName, string defaultValue) Function returns text value from registry.
    int GetValueDWORD(string path, string valueName, int defaultValue) Function returns integer value from registry.
    long GetValueQWORD(string path, string valueName, long defaultValue) Function returns integer value from registry.

    When defining path to the registry (parameter path), you have to use double slash in the script. Parameter defaultValue sets the value that will be returned if registry contains null value.

    Object call

    OG.Registry

    Examples of call

    var s1 = OG.Registry.GetValueSZ( 'HKEY_CURRENT_USER\\Software\\_text', 's1', 'X');
    var c1 = OG.Registry.GetValueDWORD( 'HKEY_CURRENT_USER\\Software\\_text', 'integer', 11);
    var c2 = OG.Registry.GetValueQWORD( 'HKEY_CURRENT_USER\\Software\\_text', 'integer2', 10);

×