blackpanda
Posts: 26
Joined: Mon Nov 05, 2018 3:52 am

Custom Action Message Box was showed behind the the form

Hi,

My custom action message box was showing behind the form and user has to click on the icon on the taskbar or move the form to see the message. Could you please tell me how can I bring it on top?
Untitled.png
Untitled.png (51.31 KiB) Viewed 2325 times
Thank you
Catalin
Posts: 6586
Joined: Wed Jun 13, 2018 7:49 am

Re: Custom Action Message Box was showed behind the the form

Hello,

Unfortunately, I can not say why this issue occurs.

Do you use our predefined "MessageBox" custom action or are you trying to spawn the messagebox from within a script (e.g. PowerShell, VBS, etc.)?

In order for me to have a better view about this, could you please forward me a copy of your .AIP file by e-mail at support at advancedinstaller dot com? You can strip it down from its files (i.e. delete them) and just send it like that so I can build and test it on our end.

Looking forward to hearing from you.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Catalin
Posts: 6586
Joined: Wed Jun 13, 2018 7:49 am

Re: Custom Action Message Box was showed behind the the form

Hello Hieu,

First of all, thank you for the provided files. I was able to build the project and successfully replicate the behavior.

Unfortunately, I can not say for sure why this happens. It seems that somehow the message box does not obtain the handle from the parent window, resulting in it being displayed in the background.

I have forwarded this to the development team and we will further investigate to try and find the root cause of this.

In the meantime, you can use another custom action to spawn the message box. For instance, I have tested this with an inline VBScript and everything worked as expected - the messagebox is spawned in the foreground. Please follow these steps in order to achieve it:

- go to "Custom Actions" page and add an "Execute inline script code" custom action without sequence

- the custom action content could look like this:

Code: Select all

MsgBox (Session.Property(REBOOT_MESSAGE))
- go to "Dialogs" page and remove the default messagebox custom action. Instead, please add another event on the "Next" button which will execute the inline VBScript.

Hope this helps.

Also, when we will have a resolution on this, I will update this thread.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Catalin
Posts: 6586
Joined: Wed Jun 13, 2018 7:49 am

Re: Custom Action Message Box was showed behind the the form

Hello Hieu,

This has been fixed in Advanced Installer 16.7, released on January 15th, 2020.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”