cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jpriyank
Level 3

LaunchAppand Wait help

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 🙂
Labels (1)
0 Kudos
(5) Replies
ChandanOmkar
Level 8

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.
0 Kudos
axiraleth
Level 3

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.

Script:

function IsUninstallOld(hMSI)

STRING szProgram, szCmdLine;

begin;

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

end;

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.
0 Kudos
ChandanOmkar
Level 8

Try the following to uninstall your product:

LaunchAppAndWait("Msiexec.exe", "/x {}", LAAW_OPTION_WAIT);

Hope this will help.
0 Kudos
axiraleth
Level 3

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.
0 Kudos
axiraleth
Level 3

Finally it works, i can't figure out the real reason for the problem.

begin;

szProgram = PROGRAMFILES ^ "InstallShield Installation Information"^"{}"^"setup.exe";
LaunchAppAndWait(szProgram,"/uninst", LAAW_OPTION_WAIT_INCL_CHILD | LAAW_OPTION_USE_SHELLEXECUTE);

end;
0 Kudos