I am trying to write a simple registry file to send to buyers of my new
product. It will serve as an unlock code. If I pull up notepad  and type the
following,

REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\myCompany\userAccount\Security]
"administrator"="adminPass"

I can save it as .reg and it will write the key successfully when you double
click it.
If I try to create the file dynamically with the following code. The file
produced will create the registry keys but will not make the string entry.
Any idea's how I can make this second process work?

<CFSET fileString = "REGEDIT4" & #CHR(13)# & #CHR(10)#>
<CFSET fileString = fileString &
"[HKEY_LOCAL_MACHINE\SOFTWARE\myCompany\userAccount\Security]" & #CHR(13)# &
#CHR(10)#>
<CFSET fileString = fileString & '"administrator"="adminPass"'>

<CFFILE ACTION="WRITE" FILE="c:\inetpub\wwwroot\Security\account.reg"
OUTPUT="#fileString#" ADDNEWLINE="No">
Bryan LaPlante
816-347-8220
[EMAIL PROTECTED]
http://www.netwebapps.com
Web Development

 
 
______________________________________________________________________
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives........ http://www.mail-archive.com/[email protected]
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe.................... mailto:[EMAIL PROTECTED]
To Unsubscribe................ mailto:[EMAIL PROTECTED]
 

Reply via email to