View Full Version : WaitForReturn problems
minsis
07-02-2009, 03:08 PM
Hi! I'm trying to make a setup of setups. To accomplish this, I've generated several setups (with Setup Factory 8), and then, put them in another setup project.
In the setup of setups, I copy all the setups in the %TempFolder%, and in the Post Install Actions I've set the following code:
File.Run(SessionVar.Expand("%TempFolder%\\FirstSetup.exe"), "", "", SW_SHOWNORMAL, true);
File.Run(SessionVar.Expand("%TempFolder%\\SecondSetup.exe"), "", "", SW_SHOWNORMAL, true);
File.Run(SessionVar.Expand("%TempFolder%\\ThirdSetup.exe"), "", "", SW_SHOWNORMAL, true);
The problem is that, in spite of I've set the WaitForReturn property to true, all the setups are launched at the same time.
Does anyone know how can I make that each setup ends before the next setup is launched?
Thanks in advance!
Minsis
jassing
07-02-2009, 06:36 PM
are they all suf based installers?
Some installers (like SUF) do this:
firstsetup.exe --> extracts a data file and another "irsetup.exe" and then runs irsetup; now some isntallers exit firstsetup.
So indeed, "wait for return" is true; as firstsetup.exe is done and exited, becuase it launched another program....
minsis
07-02-2009, 07:36 PM
Hi jassing, thank you for your reply.
I don't understand very well... all my setups have been made in Setup Factory 8, including the setup that launches the others.
The main setup "installs" the children setups in TempFolder, and on post install actions, launches each child setup by calling File.Run("%TempFolder%\\xxxSetup.exe", "", "", SW_SHOWNORMAL, true).
I need that main setup doesn't launch the second child setup, until the first child setup has finished. Is it possible?
Thanks in advance.
Minsis :huh
jassing
07-02-2009, 10:34 PM
I assume you mean:
File.Run(SessionVar.Expand("%TempFolder%\\xxSetup.exe"), "", "", SW_SHOWNORMAL, true)
i just built some code that calls that 3 times in a row, ie:
File.Run(SessionVar.Expand("%TempFolder%\\xxSetup.exe"), "", "", SW_SHOWNORMAL, true)
File.Run(SessionVar.Expand("%TempFolder%\\xxSetup.exe"), "", "", SW_SHOWNORMAL, true)
File.Run(SessionVar.Expand("%TempFolder%\\xxSetup.exe"), "", "", SW_SHOWNORMAL, true)
Dialog.Message("Test","Wait for me");
According to your report, the xxSetup should be launched 3 times, and I'd see a dialog box.
However my test was that it ran one, waited, then the other, waited, then ran the other, waited, then showed the dialog box (as expected)
Can you post a SMALL sample (sf8) that replicates your issue?
What os are you testing on?
minsis
07-03-2009, 12:57 PM
Hi jassing! you've gave me a great idea!
I resolved my problem by putting a dialog message after each File.Run.
So, the child setup is launched, and when it finishes, then a message like "Press OK to continue" appears on screen. When you press ok, the second child setup is launched, and so on...
The code now, on post install actions, is like that:
File.Run(SessionVar.Expand("%TempFolder%\\FirstSetup.exe"), "", "", SW_SHOWNORMAL, true);
Dialog.Message("Información", "Presione OK para continuar con la siguiente aplicación", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
File.Run(SessionVar.Expand("%TempFolder%\\SecondSetup.exe"), "", "", SW_SHOWNORMAL, true);
Dialog.Message("Información", "Presione OK para continuar con la siguiente aplicación", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
File.Run(SessionVar.Expand("%TempFolder%\\ThirdSetup.exe"), "", "", SW_SHOWNORMAL, true);
Thank you for your help!
Minsis
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.