View Full Version : Can't LaunchAppAndWait like in 6.31
09-04-2002, 05:11 PM
Overall, I am having a great experience with ISPRO7 since I upgraded to it from 6.31 last week. I still want to edit dialog boxes (a la 'InstallDialog') and change the sdWelcome/sdFinish bitmaps. But I digress.
I had a setup which worked fine in 6.31 that simply placed a few WinImage (http://www.winimage.com) Self-Extracting Diskette Images which create diskettes of my main InstallShield setup for Web users without CD-R drives. Anyway, I used to get away with putting all the .EXEs in the Setup Files and then using LaunchAppAndWait to call each one in succession to create all of the disks. Now, in InstallShield Professional 7, when the first of these is supposed to launch, it just goes on through the setup as if the file isn't there (or any of them).
I added an IF statement with "Is(FILE_EXISTS..." and a MessageBox to tell me if the Setup is seeing the .exe. I get my MessageBox indicating that the Is command found the file, but still the EXE is not executed. It is simply ignoring my exe's.
What is wrong?
09-04-2002, 06:00 PM
Have you tried using LongPathToQuote on the file and then doing the LaunchAppAndWait?
Another thing you can try is use ChangeDirectory to the SUPPORTDIR and then LaunchAppAndWait just the exe name without path.
09-04-2002, 09:58 PM
Is the LaunchAppAndWait function returning < 0 in this case?
If so you can check the global LAAW_PARMATERS structure's nLaunchResult member to see what GetLastError returned, after CreateProcess failed. This should correspond to a standard Win32 error value.
Please let me know what you find.
InstallShield Software Corporation
09-05-2002, 11:19 AM
I added some code to check out the return value of LaunchAppAndWait. It was 0. I also checked the value of LAAW_PARAMETERS.nLaunchResult right after calling LAAW. It was 259.
I'm looking through MSDN for clues to what this means. Of course, if you can shed some light on this, I'd appreciate it.
FYI, I think it is important to note that this exact script worked perfectly in ISPro 6.31. It was only when I opened the project (and also converted it) in 7.0 and rebuilt the same project that this problem manifested itself.
Here's a snippet of my current code:
nResult=LaunchAppAndWait(SUPPORTDIR ^ "XWARE Disk 1.exe","",LAAW_OPTION_WAIT);
MessageBoxEx(szResult,"LAAW Return Value",INFORMATION);
nResult = LAAW_PARAMETERS.nLaunchResult;
Thanks for your help so far.
09-05-2002, 11:32 AM
I took out the spaces in the filename(s) and in the script. The nLaunchResult was 0 this time. But still the exe isn't running. I shortened the filename to less than 8 characters (8.3 format) with the same result.
I'm tempted to reinstall 6.3 just to get this working.
09-05-2002, 12:53 PM
LongPath = SUPPORTDIR ^ "XWAREDsk.exe";
rc = LaunchAppAndWait(LongPath, "", WAIT);
09-05-2002, 01:35 PM
Can you email me one of the EXE's that you are trying to launch. (email@example.com).
InstallShield Software Corporation
09-11-2002, 12:07 AM
I thought since I originated this thread, that it would be nice of me to close it. Devin helped me to discover that it was not InstallShield, but my WinImage (6.0) program that was to blame.
As Devin pointed out, the SUPPORTDIR in ISPro7 has a path which is longer than in 6.x. So the InstallScript which worked in 6.x by calling the WinImage Self-executing floppy image files, exposed a bug in WinImage by not properly executing the file.
I emailed the author of WinImage about the problem with the actual path that ISPro7's engine generated when installing the program (SUPPORTDIR). When I tried to run the program directly from Windows Explorer in that folder, the same problem occured. In less than 24 hours the author sent me an updated WinImage program (6.1) which corrected this behavior.
I just checked the site (http://www.winimage.com) and the new version had not yet been posted. He might have been waiting to hear of my success before posting the file.
Okay, can't fault InstallShield for this one. But I sure did like the quick response from the shareware author, Gilles Vollant
02-06-2003, 02:34 PM
I am trying to open a readme file at the end of my setup. But Internet Explorer never seems to launch. The code is as follows.
sCommand is the fully qualified path of iexplore.exe
READMEFILE is the path to the readme.
if (SYSINFO.WIN9X.bWin9X) then
ParsePath(sPath, sCommand, PATH);
sResult = READMEFILE;
LaunchAppAndWait(sPath, sResult, LAAW_OPTION_NOWAIT);
nLaunchResult is 0.
When I run the same (iexplore.exe README) from the windows command line it works fine.
The strange thing is that the same lines of code work when executed at the beginning of the setup. (OnBegin)
Can anyone help? Thanks.
02-06-2003, 03:30 PM
OK, I figured it out. The trick was to user LaunchAppAndWaitInitStartupInfo().
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.