Adobe ColdFusion 8

cfregistry action = "get"

Description

Accesses a registry value and stores it in a ColdFusion variable.

Syntax

<cfregistry 
    action = "get"
    branch = "branch"
    entry = "key or value"
    variable = "variable"
    type = "string|dWord|key">

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 get.

branch

Required

 

Name of a registry branch.

entry

Required

 

Registry value to access.

variable

Required

 

Variable into which to put value.

type

Optional

string

  • string: returns string value.
  • dWord: returns DWord value.
  • key: returns key's default value.

Usage

If the value does not exist, the cfregistry tag does not create an entry.

Example

<!--- This example uses cfregistry with the get action. --->
<cfregistry action = "get"
    branch = "HKEY_LOCAL_MACHINE\Software\Microsoft\Java VM" 
    entry = "ClassPath" type = "String" variable = "RegValue">
<h1>cfregistry action = "get"</h1>
<cfoutput>
    Java ClassPath value is #RegValue#
</cfoutput>