cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
guyjoules
Level 4

setup.exe command prompt

Hey all..

From In InstallShield manual -
Due to the nature of DOS, when you launch Setup.exe from the command line, a DOS prompt is quickly returned although Setup.exe is still in memory.

Now, I need to run uninstallation of another setup.exe from my installing silently. It can easily be done using RunAppAndWait("setup.exe", "/s....", WAIT), but, like the manual says, it reurns immediately and I need to wait for the uninstallation to finish before proceeding.

I tried -
WaitForApplication(LAAW_PROCESS_INFORMATION.hProcess, LAAW_PROCESS_INFORMATION.dwProcessId, 10000, LAAW_OPTION_WAIT);

but it also returns immediately.

Is there a way to overcome this behavior?
Labels (1)
0 Kudos

(5) Replies
arsirantala
Level 5

I think there is no easy to way to achieve what you're after of.

I have stumbled to same issue you're having in past. I get away with it by creating autoit script which will poll for a certain process, and when the process exited, so did my autoit script. the main installer waited for autoit process to exit.
0 Kudos
RobertDickau
Flexera Alumni

Depending on the project type and InstallShield version used to create the inner installation, you might try the /w or /SMS switch to setup.exe, about which please see the topic "Setup.exe and Update.exe Command-Line Parameters".

(Standard caution about launching an MSI from an MSI, suggestion to use prerequisites, and so forth.)
0 Kudos
guyjoules
Level 4

arsirantala,

regarding the autoit script you said you've wrote for running setup.exe and wait for it to finish...

is it possible for you the share this script? can this script be embedded with installScript? in what way? can u pass parameters to this autoit?

Robert, I'm using InstallScript, not MSI project.
Also, I remember that pre-IS2008 setup.exe didn't return immediately. This is something new only in IS2008? Why FindWindow doesn't work in this situation?

thank you guys, for your help..

Guy.
0 Kudos
DebbieL
Level 17

I don't know if it would help, but did you try passing the /clone_wait parameter when you are launching the child installation?

Debbie Landers
Macrovision Corporation
0 Kudos
guyjoules
Level 4

It works now..

thanks.

Guy.
0 Kudos