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
- :
- Dialog box not popping up in the foreground on Windows 2008
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
Nov 20, 2009
09:38 AM
Dialog box not popping up in the foreground on Windows 2008
I am using a Basic MSI and calling a managed code custom action. The C# dll for my custom action contains a windows form that will pop up as a dialog during the UNINSTALL process of my product. The issue I am having is that the dialog always pops up behind the IS dialogs for uninstalling. I have seen this work on an XP machine but fails to put my dialog in the Foreground on a Windows 2008 machine. (I have tried to put in SetForeground code in my managed code but nothing seems to work.)
Any help or suggestions out there? I am completely stuck on this.
Any help or suggestions out there? I am completely stuck on this.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Nov 23, 2009
11:57 AM
The only reliable method of ensuring your window appears on top of an MSI window is to use the MSI window's handle as your window's parent. However, MSI does not provide a handle in any form to any of its UI dialogs. Unfortunately, the dialog used during uninstall (or any install launched with /qb) is a generic dialog window class, which makes it much more difficult to use something like FindWindow to obtain a handle to the MSI dialog window (attempting to find a generic dialog can result in obtaining a window handle to a completely unrelated process).
Please note that any time a basic UI or no UI is running, only the install execute sequence in the MSI is being run by Windows Installer. Any custom actions that display any type of user interface should, by definition, only display their UI when the UILevel is 4 or higher (please see http://msdn.microsoft.com/en-us/library/aa368281(VS.85).aspx). Alternately, the MsiProcessMessage API can be used to display message box type dialogs, which will properly handle displaying or not displaying a message box based on UI level automatically.
Please note that any time a basic UI or no UI is running, only the install execute sequence in the MSI is being run by Windows Installer. Any custom actions that display any type of user interface should, by definition, only display their UI when the UILevel is 4 or higher (please see http://msdn.microsoft.com/en-us/library/aa368281(VS.85).aspx). Alternately, the MsiProcessMessage API can be used to display message box type dialogs, which will properly handle displaying or not displaying a message box based on UI level automatically.
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)