Registry Meta Tag

PocketBrowser 3.x API

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

Registry (META Tag) Syntax
<META HTTP-Equiv="registry" content="[parameter>
<META HTTP-Equiv="registry" content="[parameter:attribute>

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
Copy methods template to clipboard: Copy META Tag template to clipboard META Tags Copy Javascript template to clipboard Javascript

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
Copy parameters template to clipboard: Copy META Tag template to clipboard META Tags Copy Javascript template to clipboard Javascript

The tags below add a registry setting called 'PocketBrowser' 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:PocketBrowser">
<META HTTP-Equiv="registry" Content="type:multisz">
<META HTTP-Equiv="registry" Content="persistent:true">
<META HTTP-Equiv="registry" Content="value:hello\nworld">
Copy example to clipboard Copy example to clipboard

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:PocketBrowser">
<META HTTP-Equiv="registry" Content="delete">
Copy example to clipboard Copy example to clipboard
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.