Hi,

I'm not sure how to get around this. I'm reading in a file on the server. I'm then 
looping through the results checking for "\\" and taking these lines from the file and 
adding 
them as environement variables. I want to be able to "delete" and previous envrionment 
variables in the registry if a match is found within the external file otherwise 
ignore 
the delete. I'm having trouble with this.

                <cffile action="read" file="C:\temp\test.txt" variable="ListLoop">
<cfloop list="#ListLoop#" Index="Line" Delimiters="#strCR#">
                <cfif Line CONTAINS "\\">

              <cfset Line=#Replace(Line,"#strCR#","<br>","ALL")#>
      ...
      ...
      ... etc.

<!--- 
Here is an example of a input line being read in from the external file after I've 
done multiple "Replace" on the line:

TEST|C:\temp\dir1
--->

                              <cfif Line CONTAINS "#ListGetAt(Line,1,'|')#">
                                                              <cfregistry 
action="DELETE"
                              
branch="HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment"
                              entry="#ListGetAt(Line,1,'|')#">
      </cfif>

<!--- INSERT FROM EXTERNAL FILE --->
                        <cfregistry action="SET"
                branch="HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session 
Manager\Environment"
                entry="#ListGetAt(Line,1,'|')#"
                type="String"
                                value="#ListGetAt(Line,2,'|')#">

        </cfif>
</cfloop>


---------------------------------------------------
FIGJAM
---------------------------------------------------



______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to