Re: [WiX-users] Any ideas on how to solve MessageBox focus, can be lost (using Custom Action DLL)

2013-03-28 Thread fyodork
Hi, In general you cannot access/set any MSI properties in deffered custom action. Change the script execution to immediate and you can use MessageBox but this does not solve focus problem. We use other (a bit ugly method): to use the same action/function in two sequences we make action immediate

Re: [WiX-users] Any ideas on how to solve MessageBox focus, can be lost (using Custom Action DLL)

2013-03-25 Thread Hoover, Jacob
And it's the right way because session.Message shouldn't display a modal dialog if you are running in a silent mode. -Original Message- From: Steven Ogilvie [mailto:steven.ogil...@titus.com] Sent: Monday, March 25, 2013 3:43 PM To: General discussion for Windows Installer XML toolset.

Re: [WiX-users] Any ideas on how to solve MessageBox focus, can be lost (using Custom Action DLL)

2013-03-25 Thread Steven Ogilvie
Classification: Public Oops sorry should have read the chain... When calling MessageBox.Show(blah); it is not Modal to the MSI Using session.Message(InstallMessage.User Blah); is modal to the MSI This worked for me and solved MessageBox not being modal to the MSI so I am happy with using

Re: [WiX-users] Any ideas on how to solve MessageBox focus, can be lost (using Custom Action DLL)

2013-03-25 Thread Rob Mensching
Indeed. It automatically handles all the internal message states. It's also right because the message will be routed to an external UI handler (like Burn) and be done correctly. Lots of things start working when done the right way. smile/ On Mon, Mar 25, 2013 at 2:29 PM, Hoover, Jacob

Re: [WiX-users] Any ideas on how to solve MessageBox focus, can be lost (using Custom Action DLL)

2013-03-25 Thread gapearce
Why is this *the right way*? Seems way more complicated - besides - how do I do that in C++? -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Any-ideas-on-how-to-solve-MessageBox-focus-can-be-lost-using-Custom-Action-DLL-tp7584319p7584612.html

Re: [WiX-users] Any ideas on how to solve MessageBox focus, can be lost (using Custom Action DLL)

2013-03-25 Thread Rob Mensching
::MsiProcessMessage() will tell the Windows Installer to show the message box which will get the correct Z-order. That's why it's *the right way*. You can see some helper functions around ::MsiProcessMessage() in wcautil that can make it easier to work with. On Mon, Mar 25, 2013 at 1:05 PM,

Re: [WiX-users] Any ideas on how to solve MessageBox focus, can be lost (using Custom Action DLL)

2013-03-25 Thread Steven Ogilvie
Classification: Public I use the Session Message, this is in C# I am not sure if you can use Session... This will create a message box that is Modal to the MSI catch (Exception ex) { WriteErrorLogInstall(session, SomeMethod failed: , ex, true); // this is a method I

Re: [WiX-users] Any ideas on how to solve MessageBox focus, can be lost (using Custom Action DLL)

2013-03-14 Thread Phil Wilson
You shouldn't use MessageBox. MsiProcessMessage() is the right way, typically with INSTALLMESSAGE_USER. Phil -Original Message- From: StevenOgilvie [mailto:sogil...@msn.com] Sent: Wednesday, March 13, 2013 12:05 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Any ideas on

Re: [WiX-users] Any ideas on how to solve MessageBox focus, can be lost (using Custom Action DLL)

2013-03-14 Thread Steven Ogilvie
Classification: Public I am using a C# dll and I can't seem to find info on how to use MsiProcessMessage() in C# -Original Message- From: Phil Wilson [mailto:phil.wil...@mvps.org] Sent: March-14-13 10:26 AM To: 'General discussion for Windows Installer XML toolset.' Subject: Re:

Re: [WiX-users] Any ideas on how to solve MessageBox focus, can be lost (using Custom Action DLL)

2013-03-14 Thread Phil Wilson
If you're in DTF you might find that they have something that gets to MsiProcessMessage(), a Session.Message or something. Phil -Original Message- From: Steven Ogilvie [mailto:steven.ogil...@titus.com] Sent: Thursday, March 14, 2013 8:26 AM To: General discussion for Windows Installer

Re: [WiX-users] Any ideas on how to solve MessageBox focus, can be lost (using Custom Action DLL)

2013-03-14 Thread StevenOgilvie
Solved :) Using this: catch (Exception ex) { WriteErrorLogInstall(session, Method failed: , ex, true); if (session != null) { session.Message( InstallMessage.User + (int)MessageBoxIcon.Error

Re: [WiX-users] Any ideas on how to solve MessageBox focus, can be lost (using Custom Action DLL)

2013-03-13 Thread gapearce
Try this - it will keep the messagebox on top of everything. MessageBox(NULL, LPlease click ok to continue., LSetup messageBox title, MB_OK | MB_SYSTEMMODAL); -- View this message in context: