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
- :
- Re: Window popping up behind installation dialog
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
‎May 07, 2010
05:13 PM
Window popping up behind installation dialog
Hello,
We have a Basic MSI project, InstallShield 2008. During uninstallation we are popping up a message box to display an information message to the user. Beginning with Vista and Windows 7 the dialog ends up being hidden behind the installation wizard/progress dialog. As a result the progress bar stops and the user might think the installer is hung, when it is simply waiting for the user to acknowledge our message. The message is so hidden that it only becomes visible after an Alt+Tab. If the user doesn't know it's there, the uninstallation will stuck indefinitely.
I was wondering if there is any workaround for this. We wish to display our message in front of the installation wizard, not behind it.
Our message box is a VBScript type of custom action, Synchronous (Ignores exit code), Deferred Execution, with the following script:
Sub display
MsgBox "Our message.", vbExclamation+vbMsgBoxSetForeground, "Out Title"
End Sub
We are also launching an external application, also from a synchronous custom action. That application, too, launches right behind the install shield wizard. The problem, of course, is that the user can rightfully think the installation is hung.
We experience none of these problems on XP or Windows 2003 Server, only on Vista and Windows 7.
Is there anything we can do to launch our message box and/or application in the front? Would upgrading to InstallShield 2010 help us in any way?
Regards,
Tamas
We have a Basic MSI project, InstallShield 2008. During uninstallation we are popping up a message box to display an information message to the user. Beginning with Vista and Windows 7 the dialog ends up being hidden behind the installation wizard/progress dialog. As a result the progress bar stops and the user might think the installer is hung, when it is simply waiting for the user to acknowledge our message. The message is so hidden that it only becomes visible after an Alt+Tab. If the user doesn't know it's there, the uninstallation will stuck indefinitely.
I was wondering if there is any workaround for this. We wish to display our message in front of the installation wizard, not behind it.
Our message box is a VBScript type of custom action, Synchronous (Ignores exit code), Deferred Execution, with the following script:
Sub display
MsgBox "Our message.", vbExclamation+vbMsgBoxSetForeground, "Out Title"
End Sub
We are also launching an external application, also from a synchronous custom action. That application, too, launches right behind the install shield wizard. The problem, of course, is that the user can rightfully think the installation is hung.
We experience none of these problems on XP or Windows 2003 Server, only on Vista and Windows 7.
Is there anything we can do to launch our message box and/or application in the front? Would upgrading to InstallShield 2010 help us in any way?
Regards,
Tamas
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 10, 2010
11:28 AM
You should be using MsiProcessMessage (C++, InstallScript, etc.) or Session.Message (VB) to put up a message box. Since this goes through MSI it can parent the message box so it will be shown on top.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 10, 2010
05:21 PM
Thanks a lot Michael, that worked well. VB Script to pop up a message:
[CODE]Dim record
Const msiMessageTypeUser = &H03000000
Set record = Session.Installer.CreateRecord(1)
record.StringData(0) = "[1]"
record.StringData(1) = "My message"
Session.Message msiMessageTypeUser, record[/CODE]
The external application that I launch, however, is still falling behind the installer window, regardless if I use LaunchAppAndWait from InstallScript, or a "launch executable file" custom action. For example:
One thing that works is if I set the window style in my external application to always on top:
Not an ideal solution, but better than nothing.
Tamas
[CODE]Dim record
Const msiMessageTypeUser = &H03000000
Set record = Session.Installer.CreateRecord(1)
record.StringData(0) = "[1]"
record.StringData(1) = "My message"
Session.Message msiMessageTypeUser, record[/CODE]
The external application that I launch, however, is still falling behind the installer window, regardless if I use LaunchAppAndWait from InstallScript, or a "launch executable file" custom action. For example:
LaunchAppAndWait(WINDIR ^ "Notepad.exe", "", WAIT);
One thing that works is if I set the window style in my external application to always on top:
SetWindowPos(m_hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
Not an ideal solution, but better than nothing.
Tamas
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 15, 2011
05:12 PM
Hi Tamas,
I am running into very similar issue -- where on Vista/Win7 our standard message box during uninstallation stays behind InstallShield's wizard dialog.
I assume you may have solved this issue -- if so, could you please advise? I have posted a separate post regarding this #post464762
Thanks,
Vinay
I am running into very similar issue -- where on Vista/Win7 our standard message box during uninstallation stays behind InstallShield's wizard dialog.
I assume you may have solved this issue -- if so, could you please advise? I have posted a separate post regarding this #post464762
Thanks,
Vinay
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 01, 2011
09:49 AM
I am also facing this problem
Found the article http://kb.flexerasoftware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=Q211825
but to be honest, didn't manage to solve this.
Can anybody from support guys take part in this thread and help. Please?
Found the article http://kb.flexerasoftware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=Q211825
but to be honest, didn't manage to solve this.
Can anybody from support guys take part in this thread and help. Please?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 07, 2011
01:59 PM
I ran into this issue once, and found that SetForegroundWindow did not always work on newer OS's. Some investigation was done, and found a different API that appeared to work better, but I wasn't able to fully verify that this was a 100% viable alternative to SetForegroundWindow.
I would recommend testing carefully:
SwitchToThisWindow Function
http://msdn.microsoft.com/en-us/library/ms633553(v=vs.85).aspx
Ideally, though, Michael is correct. Spawned dialog boxes should be done via MsiProcessMessage. You can change the dialog style by either customizing the SetupError dialog, or by redirecting the error dialog by setting the 'ErrorDialog' property.
I would recommend testing carefully:
SwitchToThisWindow Function
http://msdn.microsoft.com/en-us/library/ms633553(v=vs.85).aspx
Ideally, though, Michael is correct. Spawned dialog boxes should be done via MsiProcessMessage. You can change the dialog style by either customizing the SetupError dialog, or by redirecting the error dialog by setting the 'ErrorDialog' property.