LogMessage function
Writes a message to the installer's diagnostic log file.
The LogMessage 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: LogMessage
- Arguments: "message text "
The message appears in the installer's log file prefixed with message code TSU:I0065, like this:
00072040|TSU:I0065|langid|Message text
The langid portion represents the hexadecimal language code in which the installer operates, for example 0409 (US English) or 0407 (German). The maximum length of the formatted message is a little less than 1024 characters.
Arguments
The LogMessage function expects the following argument. All arguments may contain symbolic references; these will be resolved before the function is called.
- "message text "
- The message text that must be written to the diagnostic log file, surrounded by quotes.
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.