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.
| Name | Description | Default Value | 
|---|---|---|
| delete | Deletes the setting. | N/A | 
Parameters
Items listed in this section indicate parameters, or attributes which can be set.
| Name | Possible Values | Description | Default Value | 
|---|---|---|---|
| hive:[Value] | HKLM, HKCU, HKCR or HKU | Name of the root hive. | None | 
| key:[Value] | Any string | Full 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 string | Name of the setting. | None | 
| type:[Value] | DWORD, STRING, BINARY or MULTISZ | Data type of the setting. | None | 
| persistent:[Value] | TRUE or FALSE | Whether to create the corresponding merge file. | FALSE | 
| value:[Value] | Valid string for the setting type specified - see remarks | Value 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 Version | 1.0.0 or above | 
|---|---|
| Supported Devices | All supported devices except: Enterprise Tablet. | 
| Minimum Requirements | None. | 
| Persistence | Persistent - 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">