Archive: ExecWait - Fails to launch an MSI


ExecWait - Fails to launch an MSI
  I have encountered a curious problem when using ExecWait

For various reasons I need my installer to execute an MSI, so I added the following lines of code to the relevant section :


SetOverwrite on

SetOutPath "$INSTDIR\"
File "
jrejava.msi"
ExecWait '$INSTDIR\java.msi
>
When this code is executed the file is copied to the relevant directory but the msi never executes. If I change the code to this :


SetOverwrite on

SetOutPath "$INSTDIR\"
File "
jrejava.msi"
File "jrejava.bat"
ExecWait '$INSTDIR\java.bat'
>
Where java.bat contains this line :


java.msi 

>
it works fine, but this means I get a rather ugly command box while the MSI installer is running

EDIT : Found the solution
ExecWait will not execute the MSI file (for reason I am still unsure of) but if you use msiexec and pass the msi path as a parameter it works.

e.g.
ExecWait 'msiexec /i "$INSTDIR\java.msi" /qn"

/qn - specifies that the MSI should run silently

Wont allow me to edit

The reason direct execution of the MSI doesnt work is that it is not an executable file. So you would have to use ShellExec instead.


I'm having the same problem, but if I use 'msiexec /i "$INSTDIR\java.msi" or ShellExec, it's not waiting for the process to finish, and I need to know whether it was successfull or not before proceeding!