cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
DLee65
Level 13

SprintfMsiLog and DoAction events

I have learned today that it is not possible to write to the MSI Log when a custom action is launched using a DoAction event. This appears to be a problem with the MsiProcessMessage function.

So I am stuck. I want to log information for troubleshooting any customer related issues to the MSI log. My custom action has to run from a dialog using the DoAction event. So how in the heck can I write to the MSI log file?

I cannot be the only solitary person in this world who wants to write to the log file in custom action that is launched from a DoAction event.

DoAction Help states the following:
Note that custom actions launched by a DoAction ControlEvent can send a message with the Message Method, but cannot send a message with MsiProcessMessage. On systems prior to Windows Server 2003, custom actions launched by a DoAction ControlEvent cannot send messages with MsiProcessMessage or Message Method.


I believe Windows XP to be a system prior to Windows Server 2003 so I cannot use the Message Method. Has anyone else had any success with logging from a DoAction event?

Also, if the only recourse is the Message method, how do we get a `Session` object within InstallScript? Is it simply CreateObject('WindowsInstaller.Session')?
Labels (1)
0 Kudos
(2) Replies
DLee65
Level 13

Does anyone have any ideas on this issue? Thanks.
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Our favorite debug-level workaround for this is to "log" by changing a property. It's not the most elegant thing, but it sure works.
0 Kudos