WriteRegString

Description:

baWriteRegString writes a string into the Windows Registry.

Platforms:

Windows

Usage:

Result = baWriteRegString( KeyName, ValueName, Data, Branch )

Arguments:

String, string, string, string.
KeyName is the name of the key.
ValueName is the name of the value.
Data is the string to write into the registry.
Branch is the branch of the registry to use. Can be one of the following:
    "HKEY_CLASSES_ROOT"
    "HKEY_CURRENT_USER"
    "HKEY_LOCAL_MACHINE"
    "HKEY_USERS"
    "HKEY_CURRENT_USER"
    "HKEY_DYN_DATA"

Returns:

Integer.
Returns 1 if the function is successful, otherwise 0.

Examples:

Director:
OK = baWriteRegString( "Courses\Computers\101", "CurrentUser", "Gary Smith" , "HKEY_CLASSES_ROOT" )

Authorware:
OK := baWriteRegString( "Courses\\Computers\\101", "CurrentUser", "Gary Smith" , "HKEY_CLASSES_ROOT" )
 

Notes:

A Registry entry consists of keys and sub-keys, similar to the directories and sub-directories in the Windows file system. 32 bit Windows adds Values to the registry. These can be thought of as files within the key. These Values are not available under 16 bit - the ValueName argument is ignored.

To set the (Default) value of a key use an empty string for the ValueName argument.
 

See also:

baReadRegString
baReadRegNumber
baWriteRegNumber
baReadRegBinary
baWriteRegBinary
baReadRegMulti
baWriteRegMulti
baDeleteReg
baRegKeyList
baRegValueList