FResolveSyms function
Resolve symbolic variable references in a text file. Handles ANSI, Unicode UTF-8, and Unicode UTF-16 encoded plain text files, including HTML and XML files. The variable references must take one of the following forms:
- In generic text files: use <varname> as usual. Only symbolic variable references are resolved, not full symbolic expressions.
- In HTML or XML files: use <varname> in the source text (this shows as <varname> in an HTML browser). In other words: in HTML and XML files you must encode the '<' and '>' characters as per the usual HTML or XML rules, to avoid confusion with regular tags.
The FResolveSyms function is a predefined extension DLL function that is distributed with InstallMate. You can use this function by adding a Run DLL action to the action sequence in which you want to run the action. Set the Run DLL action attributes as follows:
- Function name: FResolveSyms
- Arguments: "filepath" [flags]
Arguments
The FResolveSyms function expects the following arguments. All arguments may contain symbolic references; these will be resolved before the function is called. Note that you must "quote" an argument if it contains spaces, or if it could contain spaces after expansion of symbolic references.
- filepath
- The fully qualified file path of the text file that must be processed, for example "<INSTALLDIR>\Config.xml".
- flags
- [Optional] One of the following:
0 - Treat the filepath file as a generic text file while processing (the default)
1 - Treat the filepath file as an XML file while processing
2 - Treat the filepath file as an HTML file while processing
Return value
Returns ERROR_SUCCESS (zero) if successful, else a nonzero error code. This error code is available in the LastExitCode variable.
Remarks
To use this function, you must add the extension DLL to your InstallMate project. The easiest way to do so is as follows:
- Open your InstallMate project.
- Choose File > Import > Project Items... from the main menu bar.
- Browse for and select the file Insert Extension DLL.imq, then click Open.
Alternatively, you can go to the Installer options page in your InstallMate project, click on the Advanced... button, then click on the Extension DLL tab and enter the paths to the extension DLL versions there.