cfregistry action = "get"

Description

Used with the Get action to access a registry value and store it in a ColdFusion variable.

Category

Variable manipulation tags

Syntax

<cfregistry action = "get"
  branch = "branch"
  entry = "key or value"
  variable = "variable"
  type = "data type"> 

See also

cfcookie, cfparam, cfsavecontent, cfschedule, cfset

Attributes

Attribute
Description
branch
Required. The name of the registry branch that contains the value to access.
entry
Required. The registry value to be accessed.
variable
Required. Variable into which cfregistry places the value.
type
Optional. The type of data to access:
  • string    Return a string value (default)
  • dWord    Return a DWord value
  • key    Return a key's default value

Usage

If the value does not exist, cfregistry does not create the variable.

Example

<!--- This example uses cfregistry with
   the Get Action --->
   
<html>
<head>
<title>cfregistry action = "get"</title>
</head>
<body>
<cfregistry action = "get"
 branch = "HKEY_LOCAL_MACHINE\Software\Microsoft\Java VM" 
 entry = "ClassPath" type = "String" variable = "RegValue">
<H1>cfregistry action = "get"</H1>
<cfoutput>
<P>
Java ClassPath value is #RegValue#
</cfoutput>
</body>
</html>