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

Chapter 21. Working with the System Regi... > Deleting Registry Keys and Values

21.3. Deleting Registry Keys and Values

There are times when you might find it desirable to delete information from the system registry, for example, if you want to delete a data source without having to go through the ColdFusion Administrator. The CFREGISTRY tag can delete a registry value, a single registry key or an entire registry branch by setting the ACTION attribute to Delete. But it is extremely important to know what you are doing with regards to the registry before you use this action. You should also have a current backup of your registry before using the CFREGISTRY tag to delete registry entries. Example 21-7 deletes an entry from the registry.

Example 21-7. Deleting a Registry Value

<CFREGISTRY ACTION="Delete"
          BRANCH="HKEY_LOCAL_MACHINE\Software\Allaire\ColdFusion\CurrentVersion"
          ENTRY="Test">

<CFREGISTRY ACTION="GETALL"
          BRANCH="HKEY_LOCAL_MACHINE\Software\Allaire\ColdFusion\CurrentVersion"
          NAME="GetCurrent" TYPE="Any" SORT="ASC">

<H3>HKEY_LOCAL_MACHINE\Software\Allaire\ColdFusion\CurrentVersion</H3>

<TABLE BORDER="1">
<TR>
  <TH>Entry</TH><TH>Type</TH><TH>Value</TH>
</TR>

<CFOUTPUT QUERY="GetCurrent">
<TR>
  <TD>#Entry#</TD><TD>#Type#</TD><TD>#Value#</TD>
</TR>
</CFOUTPUT>
</TABLE>

					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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