Viewing Individual Entry / Main
  ::   April 8, 2003

Programatically Determining the ColdFusion Root Directory in MX
In ColdFusion 5 (and older versions), you could use the CFREGISTRY tag to lookup the location of the ColdFusion install. This was a handy feature - especially if you wrote ColdFusion code to deal with files and directories under the ColdFusion root (not the web root) and didn't want to hard code the values.

In older versions of ColdFusion, the default install location was c:\cfusion. In ColdFusion MX, it's c:\cfusionmx.

Because CF MX no longer uses the registry to store configuration information, you obviously can't use CFREGISTRY to lookup the install location. There is, however, a new server variable that you can use instead:

SERVER.COLDFUSION.ROOTDIR

This variable gives you the full path to the ColdFusion root directory.



Calendar
Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            

Recommended Reading
Prisoner without a Name, Cell without a Number

Archives by Subject
Announcements (28)
ColdFusion (61)
Database (12)
Dreamweaver (1)
Flash (2)
Flash Remoting (2)
Flex (3)
General Development (2)
Homesite + (1)
Mach-II (3)
MAX (9)
Mozilla (2)
Music (1)
Politics (1)
Portals (2)
Travel (2)

Search

Links
CFLib.org
Raymond Camden's Blog
Christian Cantrell's Blog
Sean Corfield's Blog
Nathan Dintenfass' Blog
Todd Rafferty's Blog
Steve Rittler's Blog
Cameron Childress's Blog

Credits
Based on blog.cfc by Raymond Camden

XML Feed