tags:

views:

45

answers:

1

how to display please wait dialog while EXEC() runs another application silently.

A: 

Do you really need it to be a message box? As you might know, you can run an external *.exe during setup, and have a custom status message shown meanwhile. (The status message will be on the usual progress label during installation.)

I have a setup.exe that installs product A. This setup.exe contains a setup2.exe file, used to setup product B. setup.exe copies setup2.exe to the Program Files folder during the installation of product A. When all files have been copied, setup.exe then starts setup2.exe in the background. To accomplish this, i have done

[Run]
Filename: "{app}\setup2.exe"; StatusMSG: "Installing Product 2..."; Parameters: "/VERYSILENT /SUPPRESSMSGBOXES"

in setup.iss (that compiles to setup.exe). setup2.exe is also an Inno Setup installer, so the parameters "/VERYSILENT /SUPPRESSMSGBOXES" will make the installation of product 2 silent. During this setup, setup.exe will show the message "Installing Product 2...".

If you really need a message box to popup with the status message, you'll have to resort to Pascal scripting.

Andreas Rejbrand
Thanks, I am using EXEC() function, can I somehow show STATUS msg with pascal?
Tom
@Tom: Do you really need to use the `Exec` function? Why can't you use a `[Run]` item instead? One reason I can think of is that you need to execute the program conditionally, that is, you have something like `if ShouldExecute then Exec(...);`, where `ShouldExecute` is a boolean-valued function. But `[Run]` items can also be conditional; just add `Check:ShouldExecute` to it. See http://www.jrsoftware.org/ishelp/topic_scriptcheck.htm
Andreas Rejbrand