In article <4d6ef6e1711cde4e93d1f1e591a614d6345...@nl1mail0302.global.sdl.corp>,
    "Igor Paniushkin" <ipaniush...@sdl.com>  writes:

> It is not really related to your question, but I had a question about
> popup message box from custom action and I got an answer from Bob
> Arnson:
> Set a property in the CA and use that property as the condition in a
> SpawnDialog control event to show a message box. Never show UI from a
> CA; there's no way to get the same UI level information that MSI uses to
> determine whether UI should be shown.
> So probably try to change not to popup message box from CA, but
> SpawnDialog (new dialog?) from installer UI and maybe after closing it,
> you will have a correct focus.

I agree with Bob, you should not be calling MessageBox directly from a
CA.  However, there is a way to have Windows Installer display a
message box from a CA with ::MsiProcessMessage.  I've used this to
detect error conditions and conditionally fail a deferred CA based on
a yes/no response from the user.  If you use MsiProcessMessage, than
even a deferred CA can display a message box.

For immediate UI related CAs, its better to use the SpawnDialog
approach however.
-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
 <http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

      Legalize Adulthood! <http://legalizeadulthood.wordpress.com>

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to