Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 160
  • Last Modified:

Changing\Add Windows Registry Values

How can I change\add values to the Windows Regsitry using Coldfusion ? I am particularly interested in changing\adding to the registry items that are connected with ODBC.

I would be grateful for all advice offered regarding this.

Thanks in advance

John
0
johnclarke
Asked:
johnclarke
1 Solution
 
samphiCommented:
with CFREGISTRY.

But, ColdFusion Administrator can disable CFREGISTRY.

Phil.
0
 
Dain_AndersonCommented:
The obvious answer is the CFRegistry tag or the undocumented CFNewInternalRegistry:


Get the OBDC listing:
<CFREGISTRY
    ACTION="GETALL"
    BRANCH="HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources"
    NAME="ODBCList">

Loop through the listing (use var.entry, var.type, and var.value)
<CFLOOP QUERY = ODBCLIST>
    <CFOUTPUT>#ODBCList.entry# #ODBCList.type# #ODBCList.value#<BR></CFOUTPUT>
</CFLOOP>

You can also add items with this tag:
<CFREGISTRY ACTION="Set"
    BRANCH="HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources"
    ENTRY="hola"
    TYPE="String"
    VALUE="Microsoft Access Driver (*.mdb)">


Hope that helps.
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now