cfregistry action = "set"

Description

Used with the Set action to add a registry key, add a new value, or update value data.

Category

Variable manipulation tags

Syntax

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

See also

cfcookie, cfparam, cfsavecontent, cfschedule, cfset

Attributes

Attribute
Description
branch
Required. The name of the registry branch that contains the key or value to be set.
entry
Required. The key or value to be set.
type
Optional. The type of data you want to set:
  • string    Set a string value (default).
  • dWord    Set a DWord value.
  • key    Create a key.
value
Optional. The value data to be set. If you omit this attribute, cfregistry creates default value data, as follows:
  • string    Default value is an empty string: ""
  • dWord    Default value is 0 (zero)

Usage

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

Example

<!--- This example uses cfregistry with the Set Action to modify
   registry value data --->
   
<html>
<head>
<title>cfregistry action = "set"</title>
</head>
<body>
<!--- Normally you pass in a file name 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>
</body>
</html>