- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Write to MSI log file from installscript CA
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Write to MSI log file from installscript CA
Hi
I have Basic MSI project and using installscript,
Is there a way to directly write to the MSI log files with installscript CA ?
I already tried to use SprintfMsiLog in the installscript but it didn't worked probably since I run it through DoAction events,
Is there a way to make it work ?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @eladef ,
To write to the MSI log, SprintfMsiLog uses the MsiProcessMessage API. This API does not work from custom actions launched through DoAction events.
Note that custom actions launched by a DoAction ControlEvent can send a message with the Message Method, but cannot send a message with MsiProcessMessage.
For more details:
https://docs.microsoft.com/en-us/windows/win32/msi/doaction-controlevent
Thanks,
Jenifer
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
And what different type of CA I should use if I still want to use InstallScript and SprintfMsiLog ?
![](/skins/images/8C9D13A71C7F7695F3262372C0172D68/responsive_peak/images/icon_anonymous_message.png)