amicidavinci
Posts: 3
Joined: Thu Aug 18, 2011 6:45 pm

Focus - launched EXE stays in background

When I use a condition to launch an executable from AI, AI maintains topmost focus rather than minimizing and allowing my UI to take the foreground. I can select my UI from the taskbar, but this is a real hassle and is not typical behavior with other installers such as InstallShield, which always allows the launched EXE to take the foreground.

Can you make the installer back off it's focus when a synchronous exe process is launched?
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Focus - launched EXE stays in background

Hi,

Are you launching the executable using the predefined custom action "Launch File or Open URL" or by simply adding it as a "New Attached Custom Action"?

Also, are you using Enhanced User Interface in your package?

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
amicidavinci
Posts: 3
Joined: Thu Aug 18, 2011 6:45 pm

Re: Focus - launched EXE stays in background

I am running 3 Custom Actions at the Commit phase, and I am using the "standard" dialog set. The only additional dialog I have added into the project is the Setup Type dialog. I have 3 exe's that are launched as synchronous processes using Deferred w/no impersonation, in the order that I need them to run. The installer UI keeps grabbing the foreground, even though I have launched a synchronous exe.

Maybe you could expose a window handle that could be passed to the exe so that I could make it the parent handle of my exe's UI form?
amicidavinci
Posts: 3
Joined: Thu Aug 18, 2011 6:45 pm

Re: Focus - launched EXE stays in background

Not sure what you mean - I used the Custom Action Wizard to add the custom actions, all 3 exe's are all distributed with the installation media, and I am using a launch condition to ensure that they only run on a fresh install and not on an uninstall.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Focus - launched EXE stays in background

Hi,

So from what I see you are using a "New Installed Custom Action". I've made some tests and this indeed is launching the EXE in the background.

However, we have another predefined custom action, called "Launch File or Open URL" which can launch your file in the foreground, as it did with my tests. To use it
just right click on "Commit" and select "Add Predefined Custom Action -> Launch File or Open URL". Them delete the content of its "Command Line" field and use the
"Edit" button, found next to the field, to pick a reference for your EXE file that you want to launch.

Advanced Installer will automatically add a reference in the Command Line field, something like this:

Code: Select all

"[#myfile.exe] "
After this set your desired execution condition and options and build the package.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
anasrallah
Posts: 14
Joined: Tue Dec 13, 2011 7:52 pm

Re: Focus - launched EXE stays in background

I am having the same issue, I tried the suggestion mentioned in this thread with no luck.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Focus - launched EXE stays in background

A follow up of this issue can be found in the following thread:
http://www.advancedinstaller.com/forums ... 231#p49220

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Feature Requests”