I think the issue with ProcessMessage from within a DoAction call is that the ProcessMessage will be executed on the UI thread. The InstallExecuteSequence runs in a different process. I think with MSI 2.0 and before, the call could result in a deadlock.
BTW my logging using the ROT is rather simple. Not a log of code. You are right that logging from a DoAction call in the UI sequence(s) should be more simple Aris Green ---- Christopher Painter <[EMAIL PROTECTED]> wrote: > I once played with something similar using .NET remoting to allow EXE CA's to > communicate with the MSI handle. Eitherway, it's giving me horrible > flashbacks to how InstallScript use to have DCOM/ROT problems. It seems > incredibly complicated for something that *should* be simple if the MSI team > would just fix the problem. I found a chat session from a few years ago > where people asked about this several times and they never really gave an > answer as to WHY it doesn't work. They just kept repeating the mantra that > it doesn't work. > > http://msdn.microsoft.com/chats/transcripts/windows/05_0315_wi.aspx > > [EMAIL PROTECTED] wrote: > I have often wanted to log in UI sequence when a DoAction control event is > fired. Basically you need to queue up some logging messages in memory and the > dump them out when the dialog sequence is finished. > > One way this can be done is to run an async custom action before the frist > dialog is launced. This custom action can bind a simple IDispatch object into > the ROT using an Item Moniker. The object lives in a separate thread and STA > (must process messages) than the thread calling the async custom action. > > CustomActions called from DoAction events can access the logger through the > ROT and call the IDispatch interface using Invoke and a hardcoded DISPID and > a string argument passed in the DISPARAMS argument. > > Make sure you shut down the async CA at the end of the InstallUISequence or > when an Cancel or Error dialog pops up or the install will hang. > > I've been doing this for years, works like a charm. > > Regards, > Aris J. Green > > ---- Christopher Painter wrote: > > It's documented by the DoAction ControlEvent. > > > > http://msdn2.microsoft.com/en-us/library/aa368322(VS.85).aspx > > > > "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. For more information, see Sending > > Messages to Windows Installer Using MsiProcessMessage." > > > > > > Go figure.... If you are using a ScriptCA it would work, but not for C++. > > It would be nice if the effected versions of MSI were documented rather > > then a reference to the operating system. > > > > Of course it would be really nice if the bug would actually be fixed. I > > guess it's another one of those `works as constructed` excuses from the MSI > > team. > > > > Rob Mensching wrote: > > ::MsiProcessMessage() doesnt work when your action gets called from a > > button click. I dont know where or even if that is documented. > > > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of dB. > > Sent: Tuesday, April 15, 2008 17:23 > > To: wix-users@lists.sourceforge.net > > Subject: [WiX-users] Why doesn't logging from an immediate custom action > > work? > > > > > > > > I have a custom action that I am running within the UI sequence (immediate, > > user clicks on a button, custom action runs). Logging isnt working from > > it! I can log without any problems when the same custom action runs > > deferred. > > > > Its not the first time I see this. Any ideas? The code is straightforward > > > > MsiHandle hRec(MsiCreateRecord(3)); > > MsiRecordSetString(hRec, 0, L"[1]: [2]"); > > MsiRecordSetString(hRec, 1, action.c_str()); > > MsiRecordSetString(hRec, 2, message.c_str()); > > MsiProcessMessage(_h, INSTALLMESSAGE(INSTALLMESSAGE_INFO), hRec); > > > > > > Thx > > dB. > > > > PS: Ive been using this list a lot lately someone please tell me if > > youre tired of my e-mails J > > > > -dB. > > dblock.org / foodcandy.com > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > > Don't miss this year's exciting event. There's still time to save $100. > > Use priority code J8TL2D2. > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone_______________________________________________ > > WiX-users mailing list > > WiX-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > > > between 0000-00-00 and 9999-99-99 > --------------------------------- > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it > now. > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > between 0000-00-00 and 9999-99-99 <hr size=1>Be a better friend, > newshound, and know-it-all with Yahoo! Mobile. <a > href="http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ > "> Try it now.</a> ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users