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);
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
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
Remarks
Values of lHiveHKEY_CLASSES_ROOT = 0, HKEY_CURRENT_USER = 1, HKEY_LOCAL_MACHINE = 2 or HKEY_USERS = 3Values of lTypeREG_SZ = 1, REG_BINARY = 3, REG_DWORD = 4, REG_MULTI_SZ = 7Support for data typesThis 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).
Additional Information
Supported Platforms Windows CE, Windows Mobile Persistence Runs immediately. Min. Requirements None.