Name

SetProfileString — New as of ColdFusion 4.01

Synopsis

SetProfileString(inipath, section, entry, value)

Sets the value of a profile string entry in section of the initialization file specified by inipath. If the operation is successful, an empty string is returned. If not, an exception is thrown. Here’s an example that changes a profile string entry in one of ColdFusion’s initialization files:

<CFSET MyPath = "C:\cfusion\bin\cf40e.ini">
<CFSET MySection = "User">
<CFSET MyEntry = "UserCompany">
<CFSET MyValue = "My Company Name">
<CFSET MyProfileString = SetProfileString(MyPath, MySection, MyEntry, MyValue)>
<CFOUTPUT>
<B>Path:</B> #MyPath#<BR>
<B>Section:</B> #MySection#<BR>
<B>Entry:</B> #MyEntry#<BR>
<P><B>Profile String:</B> #MyValue#
</CFOUTPUT>

Get Programming ColdFusion now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.