You can use CFREGISTRY with the GETaction to retrieve one entry, or the GETALL action to retrieve multiple keys and values from the registry.
Use CFREGISTRY with the GETALL action to return all registry keys and values defined in a branch. You can access these values as follows:
You can optionally specify the SORT attribute to sort the record set based on the contents of the Entry, Type, and Value columns. Specify any combination of columns in a comma separated list. ASC (ascending) or DESC (descending) can be specified as qualifiers for column names. ASC is the default. For example:
Sort="type ASC, entry ASC"
![]() |
To get all values for a specified registry key: |
<CFREGISTRY ACTION="GetAll"
BRANCH="HKEY_LOCAL_MACHINE\Software\Microsoft\Java VM"
TYPE="Any" NAME="RegQuery">
<H1>CFREGISTRY ACTION="GetAll"</H1> <CFTABLE QUERY="RegQuery" COLHEADERS HTMLTABLE BORDER="Yes"> <CFCOL HEADER="<B>Entry</B>" WIDTH="35" TEXT="#RegQuery.Entry#"> <CFCOL HEADER="<B>Type</B>" WIDTH="10" TEXT="#RegQuery.Type#"> <CFCOL HEADER="<B>Value</B>" WIDTH="35" TEXT="#RegQuery.Value#"> </CFTABLE>
Use CFREGISTRY with the GET action to access a single registry value and store it in a ColdFusion variable.
![]() |
To get a specific registry value: |
<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>