InstallShield, by default, handles logging the start / end & success or failure of the Custom Action into MSI Log and here is the code snippet, from an InstallShield document, for writing detailed information into MSI Log file from the Custom Actions. The custom action can be written in InstallScript, VBScript or DLL.
InstallScript Sample
In an InstallScript custom action, you can call SprintfMsiLog to write a string to the MSI log file. For example, the following InstallScript code prototypes and defines an InstallScript custom action called LoggingTestInstallScript.
#include "ifx.h" // standard custom action prototype export prototype LoggingTestInstallScript(HWND); // custom action definition function LoggingTestInstallScript(hInstall) begin SprintfMsiLog("Calling LoggingTestInstallScript..."); // return success to MSI return ERROR_SUCCESS; end; |
Click here for the full article from InstallShield which details on writing to MSI Log file from VBScript as well as DLL Custom Actions.
No comments:
Post a Comment