I had a similar situation where I needed to convert a mass of existing code into MSI custom actions. This code called various driver installation APIs which could create message boxes in unusual situations, and these boxes were displaying behind (and hidden by) the MSI UI.
I know almost nothing about UI programming so this solution may work more by luck than design, but it works for me on Server OSes from 2000 to 2008 R2. I set the 'owner window' parameter on relevant API calls to the MSI UI window, which I find with the FindWindow function as follows: hWindow = FindWindow(TEXT("MsiDialogNoCloseClass"), NULL); I don't know to what extent I've been lucky with this; if anyone knows of a better way to achieve the same thing, please let me know. Regards, jjf > -----Original Message----- > From: Tobi Ha [mailto:tob...@gmx.net] > Sent: Tuesday, December 15, 2009 1:32 PM > To: wix-users@lists.sourceforge.net > Subject: [WiX-users] UI Custom Action displays dialog behing MSI UI > > Hello, > > I have a WiX installation that shows within a custom action a > dialog from a dll that is installed during this installation. > It all works fine, except that the dialogs appears behind the > normal MSI UI. > > Here a short example how my custom action looks like (instead > of message box, a real UI appears) > > UINT __stdcall MessageBoxAction (MSIHANDLE hInstall) > { > Beep(500,2000); > > LPCTSTR lpszText = L"A message box text"; > LPCTSTR lpszCaption = L"A message box title"; > UINT nType = MB_OK; > MessageBox(NULL,lpszText,lpszCaption,nType); > > return ERROR_SUCCESS; > } > > Is there a way to display the own UI in foreground? > > Cheers, > Tobias ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users