cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
anom217
Level 8

LaunchAppAndWait not executing?

I have an InstallScript Custom Action in a Basic MSI project that calls the LaunchAppAndWait function to execute 7zip to extract a file. The zipped file is already on the target machine. The install runs successfully, but it doesn't extract the zipped file.

Here is the message when I output the szApp and szCmd parameters from LaunchAppAndWait during the install:

C:\Program Files\7zip\7za.exe" e "C:\Program Files\OC4J\oc4j.zip" "-oC:\Program Files\OC4J"

I also print out the error code using LAAW_PARAMETERS.nLaunchResult. It returns 0, which is no error for 7zip, however the command doesn't seem to have done anything.

I have the message dialog popping up immediately after calling LaunchAppAndWait, so it stops the installation until I hit the OK button. When the dialog is up, I execute the exact same command from the DOS prompt, and it works fine. I don't understand why it isn't working in InstallShield. Can anybody shed some light on what is going wrong?
Labels (1)
0 Kudos
(1) Reply
J_anitha
Level 8

szApp = "C:\\Program Files\\7zip\\7za.exe";
LongPathToQuotes(szApp, TRUE);
szCmd = "e " + "\"" + "C:\\Program Files\\OC4J\\oc4j.zip" + "\"" + " -o " + "\"" + "C:\\Program Files\\OC4J" + "\"";
Now try LaunchAppAndWait with these two parameters.
0 Kudos