# CFREGISTRY ACTION="Set"

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

### Syntax

    <CFREGISTRY ACTION="Set"
        BRANCH="branch"
        ENTRY="key or value"
        TYPE="value type"
        VALUE="data">

#### BRANCH

Required. The name of the registry branch containing 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

CFREGISTRY creates the key or value if it does not exist.

### 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>