Overview Of Registry Access In Coldfusion; Getting Registry Values - MACROMEDIA COLDFUSION 4.5-DEVELOPING WEB Develop Manual

Developing web applications with coldfusion
Table of Contents

Advertisement

346

Overview of Registry Access in ColdFusion

ColdFusion includes the CFREGISTRY tag, which allows you to get, set, and delete
registry values. The registry is a database that Windows uses to maintain hierarchical
information about users, hardware, and software. Under UNIX, ColdFusion includes
functionality that emulates the registry. It includes keys and values:
Keys can contain either values or other keys. A key and the keys/values below it
are referred to as a branch.
Values are conceptually split into two parts: value name and value data.
The registry contains information critical to your system. Be very careful when
modifying and deleting registry values. Depending on expected usage, you might
consider using the Basic Security tab of the ColdFusion Administrator to restrict the
CFREGISTRY tag (this is especially true for ISPs, whose server may host a large and
diverse set of developers).

Getting Registry Values

You can use CFREGISTRY with the GETaction to retrieve one entry, or the GETALL
action to retrieve multiple keys and values from the registry.
Getting all keys and values
Use CFREGISTRY with the GETALL action to return all registry keys and values defined
in a branch. You can access these values as follows:
CFREGISTRY creates a record set that contains Entry, Type, and Value, which
you can access through tags such as CFOUTPUT. To fully qualify these variables
use the record set name, as specified in the NAME attribute of the CFREGISTRY
tag.
If #Type# is a key, #Value# is an empty string.
If you specify Any for TYPE, GetAll also returns any binary registry values. For
binary values, the #Type# variable contains UNSUPPORTED and #Value# is
blank.
You can optionally specify the SORT attribute to sort the record set based on the
contents of the Entry, Type, and Value columns. Specify any combination of
columns in a comma separated list. ASC (ascending) or DESC (descending) can
be specified as qualifiers for column names. ASC is the default. For example:
Sort="type ASC, entry ASC"
To get all values for a specified registry key:
1.
Code a CFREGISTRY tag with the GETALL action, specifying the branch, type, and
record set name.
Developing Web Applications with ColdFusion

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 4.5

Table of Contents