PDA

View Full Version : Making sure Run command runs .exe on top of installer screen



kkolo
03-24-2012, 11:24 AM
Hello again,
Is there a way to make sure the RUN command launches an app on top of the installer window?

I am running a third party application from setupbuilder script and for some reason when the third party installer launches (using the Run command in SetupBuilder) - it is launching behind the installer window. - Even clicking on the window for the .exe I'm running, will not allow it to show on top of the installer.

I am issuing the run command from within the main 'Loop Wizard' and using these settings:
Target Folder = %TMPDIR%
Wait for program is checked
Use ShellExecuteEx and Run Elevated are checked.


Thanks, Kathy

kkolo
03-24-2012, 12:02 PM
NOTE: When I use the same command lower down in the script (under the [Execute Programs] or [Finalize Setup] sections I do not have this problem.

However, I need to be able to run this .exe from a dialog within the 'Loop wizard'.

- Kathy

linder
03-24-2012, 12:05 PM
Kathy,

This is out of the control of the SetupBuilder installer. The installer can't bring the other application to the "foreground" -- the 3rd-party application has to do this itself. Not easy to handle because Microsoft limited the "SetToForeground" capability, but it is possible (with some tricks).

BTW, if you can't bring it to the forground means that the other installer does not handle the event queue correctly.

Friedrich

linder
03-24-2012, 12:08 PM
Kathy,

The "Loop Wizard" runs on its own thread. The installer itself can't "push" the other application to the foreground.

Friedrich

kkolo
03-24-2012, 12:20 PM
I'm sure it's not something the 3rd party .exe is doing, because no .exe's that are called from within the Loop Wizard are able to show on top of the installer dialog.

I will see if I can create some kind of workaround. But, it really seems like you should be able to do this.

Thanks, Kathy

linder
03-24-2012, 12:29 PM
Kathy,

I have uploaded a simple demo project. It runs (and waits for) a program from within the loop.

http://www.lindersoft.com/publicdownloads/rundemo.zip

Please compile and run "rundemo.sb7". In the test installer, click the RUN button. This will execute the 3rd-party application (and waits for its termination).

It works as expected here (shown on top of the installer dialog). Does this demo also work for you? Can you manipulate the rundemo.sb7 to reproduce your problem?

Thanks,
Friedrich

kkolo
04-05-2012, 01:32 PM
Works great! I tried it with an .msi and another .exe and it runs fine (On top of Installer)!

Thanks, Kathy

Was this a fix in the new build?

linder
04-05-2012, 01:48 PM
Kathy,

No, nothing changed in this area. Perhaps it is the missing "trial" nag screen at installer startup that makes a difference.

Friedrich

kkolo
04-05-2012, 03:00 PM
Hi,

Yea, I was able to use your test but, in my app the third party installer still shows up behind the setupbuilder installer.

Can I send you a copy of my script to look at?

- Kathy

kkolo
04-05-2012, 04:09 PM
Hi Friedrich,

I created a simple version that shows the issue I'm having.
I uploaded to attachements

RunOtherInstallIssue.txt - which is the script export to text

and

RunOtherInstallIssue_CompilerOutput_.txt - which is the compiler output

Let me know if you are able to see the issue with this script.

Thanks, Kathy

kkolo
04-05-2012, 04:13 PM
Sorry forgot I could upload the script itself. I'm a little tired this afternoon. :rolleyes:

Just uploaded a .zip with the actual script.

linder
04-06-2012, 02:00 AM
Kathy,

:)

See attached screenshot. You have the "Always on Top" option enabled. You check this box if you want to force the install to remain on top of all open applications on the user's desktop. So as a result, your install stays "on top" if you launch a 3rd-party install from it ;-) By default, this option is disabled.

Does this help?

Friedrich

kkolo
04-06-2012, 06:00 AM
OMG. LOL etc.....

You know I checked all the properties of the project. I went through all the properties of the run command everything but the Loop Wizard itself. <sigh>

That'll teach me!

Thank You!

linder
04-06-2012, 06:12 AM
<VBG> ;)

You are very welcome!

Friedrich