Registry Module

RhoElements 2.x API

Overview

The Registry Module is used to write and delete registry settings, and create corresponding merge files.

Syntax

registry (Module) <META> Syntax

<META HTTP-Equiv="registry" content="[parameter]">

<META HTTP-Equiv="registry" content="[parameter:attribute]">

Registry JavaScript Object Syntax:
By default the JavaScript Object 'registry' will exist on the current page and can be used to interact directly with the registry.
To Invoke registry methods via JavaScript use the following syntax: registry.method();

e.g. registry.delete();

To Set registry parameters via JavaScript use the following syntax: registry.parameter = 'value'; remembering to enclose your value in quotes where appropriate.

e.g. registry.hive = 'value';

To set multiple EMML parameters / events on a single line use the following syntax: registry.setEMML("[Your EMML Tags]");

e.g. registry.setEMML("hive:valuedelete");

Methods

Items listed in this section indicate methods or, in some cases, indicate parameters which will be retrieved.

NameDescriptionDefault Value
deleteDeletes the setting. N/A

Parameters

Items listed in this section indicate parameters, or attributes which can be set.

NamePossible ValuesDescriptionDefault Value
hive:[Value] HKLM, HKCU, HKCR or HKUName of the root hive.None
key:[Value] Any stringFull path of the key, including '\' separators as required. Remember to use '\\' in JavaScript to specify backslash whereas just a single '\' should be used in META tags.None
setting:[Value] Any stringName of the setting.None
type:[Value] DWORD, STRING, BINARY or MULTISZData type of the setting.None
persistent:[Value] TRUE or FALSEWhether to create the corresponding merge file.FALSE
value:[Value] Valid string for the setting type specified - see remarksValue for the setting.None

Remarks

Hive values

The values HKLM, HKCU, HKCR and HKU correspond to HKEY_LOCAL_MACHINE, HKEY_CURRENT_USER, HKEY_CLASSES_ROOT and HKEY_USERS.

Data types

The value is formatted for each data type as follows.


DATA TYPE    VALUE FORMAT
dword        A decimal number.
string       Any string of characters.
binary       A string of hexadecimal digits (0-9, A-F).
             There must be an even number of digits.
multisz      Multiple strings of characters, separated by \n.
             To include a backslash (\) in a string write a double backslash (\\).
      

Merge files

When the persistent tag is given the module will write a .reg file to the \Application folder on the device, which will add the setting to the registry when merged by Windows CE/WM, e.g. during a cold boot. When the persistent tag is given when deleting a setting, the module deletes any existing .reg file created above, and creates a new .reg file which will delete the setting when merged - this is in addition to deleting the registry setting itself.

Deprecation

The Registry module has been deprecated. It is advised to use the SetRegistrySetting/GetRegistrySetting/ReadConfigSetting/WriteConfigSetting methods in the Generic module instead.

Requirements

RhoElements Version1.0.0 or above
Supported DevicesAll supported devices except: Enterprise Tablet.
Minimum RequirementsNone.
PersistencePersistent - Changes to this module will persist when navigating to a new page.

HTML/JavaScript Examples

The tags below add a registry setting called 'RhoElements' in the 'Software' key of the HKEY_LOCAL_MACHINE hive. The setting is of type 'multisz' and has the values 'hello' and 'world'. The corresponding .reg merge file will be created in the \Application folder.

        <META HTTP-Equiv="registry" Content="hive:hklm">
        <META HTTP-Equiv="registry" Content="key:Software">
        <META HTTP-Equiv="registry" Content="setting:RhoElements">
        <META HTTP-Equiv="registry" Content="type:multisz">
        <META HTTP-Equiv="registry" Content="persistent:true">
        <META HTTP-Equiv="registry" Content="value:hello\nworld">

The tags below delete the above setting.

        <META HTTP-Equiv="registry" Content="hive:hklm">
        <META HTTP-Equiv="registry" Content="key:Software">
        <META HTTP-Equiv="registry" Content="setting:RhoElements">
        <META HTTP-Equiv="registry" Content="delete">