• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

25. Working with the System Registry > 25.1. Getting Registry Keys and Values

Getting Registry Keys and Values

The cfregistry tag gives you two methods for retrieving keys and values from the registry. You can set the action attribute to GetAll to retrieve all the particular keys/values associated with a particular branch, or you can set action="Get" to retrieve the value associated with a specific entry.

Let’s consider a scenario where we want to look up information about any ODBC data sources set up on the same machine as ColdFusion. There is a registry branch we can access that contains this information. The branch is:

HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.INI

It contains a list of every ODBC data source registered on the system. Each key contains several other subkeys relating to the ODBC connection. Example 25-1 shows how to perform the registry lookup.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint