SetRegistrySetting Method

PocketBrowser 3.x API

The SetRegistrySetting Method of the Generic ActiveX Object Sets the specified registry setting on the device.

SetRegistrySetting (Method of the Generic ActiveX Object) Syntax
objGeneric.SetRegistrySetting(lHive, lType, strKey, strSetting, strData);

ParametersW Toggle Parameters

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

Name Possible Values Description
Default Value
lHive Number, See Remarks The hive name N/A
lType Number, See Remarks The type of registry entry N/A
strKey String Name of key to be set N/A
strSetting String Name of the key setting to be set N/A
strData String The string value to be set N/A

Examples Toggle Examples

The following javascript example sets the HKEY_LOCAL_MACHINE\Software\Symbol\MySettings\Name value to Fred:

<script>
var objGeneric = new ActiveXObject("PocketBrowser.Generic");
var REG_SZ = 1;
var HKEY_LOCAL_MACHINE = 2;
var strData = "Fred";

objGeneric.SetRegistrySetting(HKEY_LOCAL_MACHINE, REG_SZ, "Software\\Symbol\\MySettings", "Name", strData);
<script>
Copy example to clipboard Copy example to clipboard

Remarks Toggle Remarks

Values of lHive
HKEY_CLASSES_ROOT = 0, HKEY_CURRENT_USER = 1, HKEY_LOCAL_MACHINE = 2 or HKEY_USERS = 3

Values of lType
REG_SZ = 1, REG_BINARY = 3, REG_DWORD = 4, REG_MULTI_SZ = 7

Support for data types
This method does not consistently support data types other than REG_SZ - for any other type it is recommended to use the Registry module (via InvokeMETAFunction as necessary).


Info Toggle Additional Information

Supported Platforms Windows CE, Windows Mobile
Persistence Runs immediately.
Min. Requirements None.