Skip to content

Set_Profile_String

Obsolete

This command is obsolete. Use the cRegistry class for accessing the Windows Registry in DataFlex.

Purpose

To set the contents of a value of a key in the DataFlex (current version) branch in the Registry, creating new keys and values if they do not already exist.

Syntax

set_profile_string
    subkeyname valuename
    to
    value

Argument Explanation

  • subkeyname: The name of a subkey in the DataFlex default section of the Registry. DataFlex 9.1 points to "Data Access Worldwide\DataFlex 9.1" by default.

  • valuename: The name of a value defined in subkeyname.

  • value: The new contents of the value valuename.

Alternate Syntax

set_profile_string
    keyname
    subkeyname ;
    [valuename value[, ... ..., valuename value]]

Argument Explanation

  • keyname: The name of a key in the DataFlex (current version) default branch of the Registry.

  • subkeyname: The subkey that contains the values to set.

  • valuename: The name of a value defined in subkeyname.

  • value: The new contents of the value valuename.

What It Does

Set_profile_string sets the contents of one or more values in a subkey of the DataFlex default branch of the Registry.

The DataFlex default branch of the registry is Software in the HKEY_LOCAL_MACHINE root. This can be changed in and for a running DataFlex program with the set_registry_root command. If the default is changed, all set_profile_string commands will address the redefined default until an additional set_registry_root statement restores it to the original default.

Notes

  • If no key called keyname is found in the DataFlex default branch, and/or no value called valuename is found under keyname, keyname and/or valuename is (are) created and set to the contents of value.

  • Using the alternate format, multiple valuenames can be set for the same subkeyname, but subkeyname and keyname must be named. Further, the to keyword is not used between items and their values. The item/value pairs are separated from each other by commas.