PDA

View Full Version : LaunchAppAndWait



navneet
06-23-2006, 01:46 AM
Hi,

I am using LaunchAppAndWait at the end of the InstallScript and installing 4 other installers required for our application.

The installtion works fine but while it is waiting for the installers to complete the parent installer becomes unresponsive. Is there anyway I can show the user a message saying "please wait while it install other application" in the main installer and move the progressbar after each installer completes.

I saw there is a callback option but not sure what to put in there. Something like vb's doevents so that it paints the main window, is there any in installscript.

DLee65
06-23-2006, 04:30 AM
Would something like SdShowMsg work? I often do this if the main install is going to be waiting for some external process to finish.

SdShowMsg("Please wait for process to finish...", TRUE);
LaunchAppAndWait(...);
SdShowMsg("Please wait for process to finish...", FALSE);
SdShowMsg("Please wait for process2 to finish...", TRUE);
LaunchAppAndWait(...Process2...);
SdShowMsg(..., FALSE);

MotoJason
06-23-2006, 07:30 AM
I have the same thing happen in an installer I built. What I ended up doing is just displaying a message on a background window that states something to the affect of setup is initializing components, please wait and I also set the mouse pointer to an hourglass. I give an example below. Please post if you find that the SdShowMsg that you had displayed works.


Enable(BACKGROUND);
Enable(FULLWINDOWMODE);
SetDisplayEffect (EFF_FADE);
PlaceBitmap(SUPPORTDIR^"DisplayImage.bmp", 1, CENTERED, CENTERED, CENTERED);

MotoJason
06-23-2006, 09:48 AM
Ok, I tried the SdShowMsg, and our group likes that look better. It looks a bit more professional to us. Thank you DLee65 for the suggestion. Half the battle is knowing what is available to use.

DevinEllingson
06-26-2006, 11:37 AM
FYI, you can also use the 'LAAW_OPTION_USE_CALLBACK' option in order to have the setup call a script event every 1 second while the launched app is running. In this script event you could update a progress bar displayed while the launched application is running.

Devin Ellingson
Software Developer
InstallShield, A Macrovision Company

MotoJason
06-26-2006, 12:47 PM
Devin,

How would that work? Would I use SetStatusWindow() and StatusUpdate() functions to occomplish this?



FYI, you can also use the 'LAAW_OPTION_USE_CALLBACK' option in order to have the setup call a script event every 1 second while the launched app is running. In this script event you could update a progress bar displayed while the launched application is running.

Devin Ellingson
Software Developer
InstallShield, A Macrovision Company

DevinEllingson
06-26-2006, 03:15 PM
Yes, you would have to update the progress bar manually, if you wanted it to go from 0 to 100 only once (as opposed to updating it from 0 to 100 on a timer over and over just to indicate that an operation is occuring) you would have to get status information from the running app. in order to determine the % completed.

Devin Ellingson
Software Developer
InstallShield, A Macrovision Company

Jamesr
09-26-2007, 11:28 AM
Hello,

I am trying to use the call back and have the code as follows...

(I've basically thrown in everything I can find in dispair)

(this should initialize I think)
nvProgress = 0;
SetStatusWindow (0, "Installing SQL Server 2005 Express...");
StatusUpdate(FALSE,0);
LaunchAppAndWait( SourceDir
+ "\prog.exe", "" , LAAW_OPTION_USE_CALLBACK);
SetStatusWindow (0, "Installing SQL Server 2005 Express...");
StatusUpdate(TRUE,0);

the callback is here....

function number OnLaunchAppAndWaitCallback( )
begin
nvProgress++;
if (nvProgress = 100) then
nvProgress = 0;
endif;

SetStatusWindow (nvProgress, "Installing SQL Server 2005 Express...");
StatusUpdate(FALSE,nvProgress);
return 0;
end;

but the progress bar doesn't progress any ideas?

thanks