winRegistry.write

Syntax winRegistry.write (path, value, type="")

Params path is a backslash-delimited path name to the registry key whose value you wish to write.

value is the value to write to the key or value specified by path.

type is the type to use when writing the key or value. The default is the empty string, which specifies that the type is to be set automatically, based on the type of the value parameter.

Action Sets the value of a registry key.

Returns true

Examples winRegistry.write ("HKCR\\MyKey\\MyString", "Hello World!")

   » true

local (b = binary ("12345")); winRegistry.write ("HKCR\\MyKey\\MyBinary", b)

   » true

local (n = 1); winRegistry.write ("HKCR\\MyKey\\MyDword", n, "REG_DWORD")

   » true

Notes Top-level keys may be abbreviated. The key names and corresponding abbreviations are:

HKCR -- HKEY_CLASSES_ROOT

HKCU -- HKEY_CURRENT_USER

HKLM -- HKEY_LOCAL_MACHINE

HKU -- HKEY_USERS

HKCC -- HKEY_CURRENT_CONFIG

Possible values for type are:

REG_SZ -- a registry string

REG_BINARY -- a regisrty binary

REG_DWORD -- a four-byte binary value

This verb is new in Frontier 7.0.

Platform Notes This verb is only implemented in the Windows version of Frontier.

See Also winRegistry.read

winRegistry.getType

winRegistry.delete

Discuss