Specifying an alternate CleverPath Forest & Trees FTW.INI location from the CleverPath Portal Content Handler
CleverPath Forest & Trees uses the FTW.INI file to read and write configuration information every time Forest & Trees is executed. The default location of the FTW.INI file is the Windows Folder which is typically c:\windows. This is not always a convenient or workable location for this configuration file.
For example, if a user has a Desktop PC on which the user permissions do not allow writes to the windows folder. When any default instance of Forest & Trees is started, by that user on that machine, a message "Unable to write to profile file" will be shown.
This could typically occur when starting the Forest & Trees Runtime by opening an FTV from within portal.
A solution to this problem is to change the location of the FTW.INI file by specifying a different writable location from within the Forest & Trees Portal Content Handler Template. This is achieved by inserting either the -p or -P start-up option as a parameter into the object tag which instantiates the Forest & Trees object at runtime. This will then start the runtime with an FTW.INI located in a writeable location. A full explanation of the -P command line option is below.
|-P ini_file or|
- p ini_file
|Profile name option. Replaces the default FTW.INI file with a specified *.INI file. Enclose the file name in double quotes if it contains spaces or other special characters. If you do not include the path, the file must be in the current folder. If you specify lowercase -p, the path is assumed to be relative to the location of F&T's KRN.DLL file.|
This option should be inserted into the content handler html in the PARAM tag of the runtime object. E.g. If the writable folder was called c:\ftw data then the PARAM tag should look like this:
<param Name="ViewFile" Value="&documentURL&?SESSION=&sessionKey&&PASSTHRU=TRUE";P "c:\ftw data">
There is a full sample content handler showing where the change should be placed in the section below.
Note: After this change every user that accesses an ftv through the portal will need to be able to write to the location specified in the -P flag.
Using the sample content handler template from the Forest & Trees help file, this following example illustrates where the extra option should be inserted.
<!--------- This is the HTML template file that is used by the CleverPathForest & Trees Runtime Content Handler. This file should belocated in the ...portalserver\properties folder. When aForest & Trees view file (.ftv) is requested from the server, the content handler will return this html file with thereferences "&documentURL&" and "&sessionKey&" replaced withthe requested document's URL and the current Portal sessionkey.This file can be modified to suit your needs. Just be sure toinclude the <object> element with the proper "&documentURL&" and"&sessionKey&" references--both references are case sensitive--and the REQUIRED "PASSTHRU=TRUE" specifier for the ViewFileparameter and attribute.---------->
<object ID="FTW" Name="FTW" classid="clsid:5FADE212-B755-11D1-BA39-00C04FD60C4B" width="100%" height="100%" codebase="LOCATION_OF_F&T_RUNTIME_WEBSETUP_EXE#Version=7,0,14"> <PARAM Name="ViewFile" Value="&documentURL&?SESSION=&sessionKey&&PASSTHRU=TRUE";-P "LOCATION OF ALTERNATE FTW.INI?><embed type="application/x-ftv" align="baseline" border="0" width="100%" height="100%" ViewFile="&documentURL&?SESSION=&sessionKey&&PASSTHRU=TRUE" pluginspage="LOCATION_OF_F&T_RUNTIME_WEBSETUP_EXE_OR_HTML_PAGE"> </object>