This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: SprintfMsiLog and DoAction events
Subscribe
- 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
‎Jul 23, 2008
02:35 PM
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:
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')?
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')?
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 24, 2008
08:50 AM
Does anyone have any ideas on this issue? Thanks.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 24, 2008
04:19 PM
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.
![](/skins/images/3B39CE851FDD5528C393F146EB70A2D0/responsive_peak/images/icon_anonymous_message.png)