We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Fluxtor
Posts: 17
Joined: Thu Apr 09, 2015 3:33 pm

Set Focus of exe called by custom action?

Hi,

We've built an installer with some custom actions and one of those is to run an exe that's packaged with the installer.

Is there a way to force the exe to have focus (bring to front) when it has been fired? Currently it fires but sits flashing in the task bar as the installer itself maintains focus.

Great product BTW!

Cheers
Fluxtor
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Set Focus of exe called by custom action?

Hi Fluxtor,

Thank you for your kind words.

Unfortunately the Operating System decides if an application is launched in foreground or in background. However, you please tell us if you can replicate the behaviour on multiple machines and what custom action are you using to launch the related .EXE?

If you are not using the launch file predefined custom action to launch the .EXE, can you please tell us if the behaviour still persist when using this custom action? Is the related .EXE still launched in the background?

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Fluxtor
Posts: 17
Joined: Thu Apr 09, 2015 3:33 pm

Re: Set Focus of exe called by custom action?

Hi Dan,

Thanks for the reply. We're currently using the 'Launch Installed File' pre defined custom action and I've only tested the installer on Windows 10 so far. I'll test it on Windows 7 and 8 later today and let you know the results.

Thanks
Trev
Fluxtor
Posts: 17
Joined: Thu Apr 09, 2015 3:33 pm

Re: Set Focus of exe called by custom action?

Okay,

I've now checked the installer on Win 7,8 and 10 and it performs the same in every instance i.e. the .exe that we are calling via a custom action (Launch Installed File) does not gain focus and the installer itself maintains focus.

Whilst this does not stop the process from completing we would like if possible to be able to make the exe take focus as it is something we would like the end user to interact with and it's not obvious when it is running behind the installer that it's required.

Appreciate any help.

Regards
Trev
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Set Focus of exe called by custom action?

Hi Trev,

Can you please let us know if the behaviour still persist when using the latest version of Advanced Installer? If it does, please strip down your project to a basic size containing only the exe and other resources absolutely necessary to reproduce the issue. Make sure this sample project is buildable and send a download link for it to support at advanced installer dot com so we can build it and study the issue.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Fluxtor
Posts: 17
Joined: Thu Apr 09, 2015 3:33 pm

Re: Set Focus of exe called by custom action?

Hi Dan,

I tried with the latest version 12.6 and the problem persists. As you mentioned previously this is probably OS intentional behavior to prohibit the steeling of focus from the running application. We have come up with a work around by setting the application that we are calling topmost flag = true if it is run with command argument. This way we can add a command argument to the custom action in the installer and the .exe will now take focus when it's fired.

I've tested this on Windows 7, 8 and 10 and works as expected so you can consider this problem solved!

Thank you for your time and effort thus far!
Trev
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Set Focus of exe called by custom action?

You're always welcome Trev,

I'm glad you got this working.
If there is anything else I can help you with, please let me know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”