View Full Version : LaunchAppand Wait help

10-09-2009, 07:58 AM
hi all

I'm trying to run vbscript with LaunchAppandWait. this script has to be provided with arguments while running (so I'll have to use Wscript.Arguments to get them).

i tried 2 things but none works. this is what i tried :

1. szcommand= PATH ^ "registeration.vbs -i"
LaunchAppAndWait(WINSYSDIR ^ "Cscript.exe" ,szcommand, WAIT)

2. szcommand = WINSYSDIR ^ "Cscript.exe"
szcommand = szcommand + " registeration.vbs -i"
LaunchAppAndWait(WINSYSDIR ^ "CMD.exe" ,szcommand, WAIT)

Please help me out with this problem

Thanks in advance :)

10-12-2009, 06:42 AM
Try the following command:

szcommand= PATH ^ "registeration.vbs -i";
LaunchAppAndWait("Cscript.exe" , szcommand, LAAW_OPTION_WAIT);

I think you are facing problem due the first parameter passed in the launchappandwait , which includes quotes and without quotes.

11-16-2009, 06:51 AM
Hey there...

I built an Basic MSI Installation with different scripts and custom actions inside that all work fine. There is one script which checks for older versions of the application and if it detects one of these it will be uninstall the old version...a dialogue pops up and asks the user for uninstall during the installwelcome dialogue. Now the installwelcome should wait for the uninstall and don't give the user the option to click "next" till the uninstall is done.


function IsUninstallOld(hMSI)

STRING szProgram, szCmdLine;


szProgram = PROGRAMFILES ^ "InstallShield Installation Information"^"{GUID-OldProduct}"^"setup.exe";
szCmdLine = "/uninst";
LaunchAppAndWait(szProgram, szCmdLine, LAAW_OPTION_WAIT);


The Problem:
The script is working, but the new install don't wait for it...the install progress still go on. So the user can click till the end of install and push the butten for uninstall yes/no after the whole installation of the new one. So if the INSTALLDIR of the old is equal to the new one the new Programmfiles will be uninstalled. :confused:

Thanks for every little idea.

11-16-2009, 07:00 AM
Try the following to uninstall your product:

LaunchAppAndWait("Msiexec.exe", "/x {<Old product GUID>}", LAAW_OPTION_WAIT);

Hope this will help.

11-16-2009, 07:57 AM
Thx, but it doesn't work, because the old app has no msi entry. It was an Installscript - Install only.

The script starts -> popup yes/no and wait as i wished, but if i push yes for uninstall the result is an error because the old install can't detectet.

11-16-2009, 09:24 AM
Finally it works, i can't figure out the real reason for the problem.


szProgram = PROGRAMFILES ^ "InstallShield Installation Information"^"{<Old product GUID>}"^"setup.exe";