DeleteReg

Description:

baDeleteReg deletes a key or value from the Windows Registry.

Platforms:

Windows

Usage:

Result = baDeleteReg( KeyName, ValueName, Branch )

Arguments:

String, string, string.
KeyName is the name of the key.
ValueName is the name of the value. A empty string will delete the entire KeyName.
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 = baDeleteReg( "Courses\Computers", "Course", "HKEY_CLASSES_ROOT" )

Authorware:
OK := baDeleteReg( "Courses\\Computers", "Course", HKEY_CLASSES_ROOT" )
 

Notes:

 Under Windows NT/2000/XP/Vista a key can only be deleted if it is empty. Under Windows 95/08/ME, all sub keys will also be deleted.
 

See also:

baReadRegString
baWriteRegString
baReadRegNumber
baReadRegNumber
baReadRegBinary
baWriteRegBinary
baRegKeyList
baRegValueList