Adobe ColdFusion 8

cfregistry action = "set"

Description

Adds a registry key, adds a value, or updates a value.

Syntax

<cfregistry 
    action = "set"
    branch = "branch"
    entry = "key or value"
    type = "string|dWord|key"
    value = "data">

Note: You can specify this tag's attributes in an attributeCollection attribute whose value is a structure. Specify the structure name in the attributeCollection attribute and use the tag's attribute names as structure keys.

See also

"Using Persistent Data and Locking"7 in the ColdFusion Developer's Guide

Attributes

Attribute

Req/Opt

Default

Description

action

Required

 

Always set.

branch

Required

 

Name of a registry branch.

entry

Required

 

Key or value to set.

type

Optional

 

  • string: sets a string value (default).
  • dWord: sets a DWord value.
  • key: creates a key.

value

Optional

 

Value data to set. If you omit this attribute, the cfregistry tag creates default value, as follows:

  • string: creates an empty string: "".
  • dWord: creates a value of 0 (zero).

Usage

If it does not exist, the cfregistry tag creates the key or value.

Example

<!--- This example uses the cfregistry set action to modify registry value data. --->
<!--- Normally you pass in a filename instead of setting one here. --->
<cfset FileName = "dummy.cfm">
<cfregistry action = "set"
    branch = "HKEY_LOCAL_MACHINE\Software\cflangref"
    entry = "LastCFM01" type = "String" value = "#FileName#">
<h1>cfregistry action = "set"</h1>