This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: LaunchAppAndWait doesn't wait + small status dialog
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 03, 2012
02:49 PM
LaunchAppAndWait doesn't wait + small status dialog
Hello,
Currently I'm working on an InstallScript project for a game modification. Just before completing the installation, some executables need to be run to set everything up.
The last feature that is installed, has an OnInstalled feature event with the following code:
The ExecutePatches.bat contains the code that searches for and launches the required application, which are variable and thus cannot be called directly from the InstallScript.
The batch file is run, but InstallShield shows the Setup complete dialog immediately. I doesn't wait for the batch file to close (which keeps being shown during the installation of the required applications).
I guess the last parameter of my LaunchAppAndWait call is wrong, but I can't seem to find the problem.
Additionally I want to hide the batch window and show a dialog like this:
http://ideacts.s3.amazonaws.com/PartnerDownloads/C3M_Web_Help/Chapter_2/2.32.gif
I guess I can hide it by OR'ing the last parameter with LAAW_OPTION_HIDDEN, but I don't know which function to use to show the small status dialog.
Does anyone know how to achieve the things I've mentioned above?
Thanks in advance!
Kind regards,
Martijn van Berkel
Currently I'm working on an InstallScript project for a game modification. Just before completing the installation, some executables need to be run to set everything up.
The last feature that is installed, has an OnInstalled feature event with the following code:
function ExecutePatches()
NUMBER nResult;
begin
nResult = LaunchAppAndWait ( "\"" + TARGETDIR ^ "ExecutePatches.bat\"", "", LAAW_OPTION_SHOW_HOURGLASS );
end;
The ExecutePatches.bat contains the code that searches for and launches the required application, which are variable and thus cannot be called directly from the InstallScript.
The batch file is run, but InstallShield shows the Setup complete dialog immediately. I doesn't wait for the batch file to close (which keeps being shown during the installation of the required applications).
I guess the last parameter of my LaunchAppAndWait call is wrong, but I can't seem to find the problem.
Additionally I want to hide the batch window and show a dialog like this:
http://ideacts.s3.amazonaws.com/PartnerDownloads/C3M_Web_Help/Chapter_2/2.32.gif
I guess I can hide it by OR'ing the last parameter with LAAW_OPTION_HIDDEN, but I don't know which function to use to show the small status dialog.
Does anyone know how to achieve the things I've mentioned above?
Thanks in advance!
Kind regards,
Martijn van Berkel
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 06, 2012
09:31 AM
#define WIN_DIR WINDIR^"system32"
#define FILE_SPEC "D3DX9_43.dll"
#define SOURCE_FILES SRCDIR
#define DIRECTX "Support\\directx9.0c\\dxsetup.exe"
#define CMD_LINE " /silent"
LaunchApplication ( DIRECTX ,CMD_LINE, SOURCE_FILES , SW_SHOW , 1000000 , WAIT | LAAW_OPTION_WAIT_INCL_CHILD);
TAKE THIS AS EXAMPLE !
LaunchApplication ( szProgram , szCmdLine , szDirectory , SW_SHOW , nTimeOut , LAAW_OPTION_WAIT_INCL_CHILD );
you may use SW_HIDE instead of SW_SHOW if you want to be invisible when install .
#define FILE_SPEC "D3DX9_43.dll"
#define SOURCE_FILES SRCDIR
#define DIRECTX "Support\\directx9.0c\\dxsetup.exe"
#define CMD_LINE " /silent"
LaunchApplication ( DIRECTX ,CMD_LINE, SOURCE_FILES , SW_SHOW , 1000000 , WAIT | LAAW_OPTION_WAIT_INCL_CHILD);
TAKE THIS AS EXAMPLE !
LaunchApplication ( szProgram , szCmdLine , szDirectory , SW_SHOW , nTimeOut , LAAW_OPTION_WAIT_INCL_CHILD );
you may use SW_HIDE instead of SW_SHOW if you want to be invisible when install .
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 08, 2012
10:28 AM
Thanks for your reply. I'll try it out in the next build. Using SW_HIDE, will it only hide the batch window and not the programs the batch file starts?
By the way, I found out that the small status dialog can be shown using SdShowMsg. 🙂
By the way, I found out that the small status dialog can be shown using SdShowMsg. 🙂
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 11, 2012
04:13 PM
the batch will start in SILENT mode! he'll do the job 🙂
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 13, 2012
05:08 PM
begin
nResult = LaunchAppAndWait ( "\"" + TARGETDIR ^ "ExecutePatches.bat\"", "", WAIT | LAAW_OPTION_WAIT_INCL_CHILD );
Delay(3);
end;
nResult = LaunchAppAndWait ( "\"" + TARGETDIR ^ "ExecutePatches.bat\"", "", WAIT | LAAW_OPTION_WAIT_INCL_CHILD );
Delay(3);
end;
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 17, 2012
11:38 AM
KEiGHT wrote:
begin
nResult = LaunchAppAndWait ( "\"" + TARGETDIR ^ "ExecutePatches.bat\"", "", WAIT | LAAW_OPTION_WAIT_INCL_CHILD );
Delay(3);
end;
Thanks for this. It works perfectly!
Final version:
function ExecutePatches()
NUMBER nResult;
begin
SdShowMsg ( @ID_STRING_EXECUTINGPATCHES, TRUE );
Delay(1);
nResult = LaunchAppAndWait ( "\"" + TARGETDIR ^ "ExecutePatches.bat\"", "", LAAW_OPTION_WAIT | LAAW_OPTION_WAIT_INCL_CHILD | LAAW_OPTION_HIDDEN);
Delay(1);
SdShowMsg ( @ID_STRING_EXECUTINGPATCHES, FALSE );
end;
Thanks for your help! 😄
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)