Archive: ExecWait on .msi file for silent install


ExecWait on .msi file for silent install
Any idea why my function doesn't work with Acrobat Reader v7.0.9 installer ?

I use a function


###################
# InstallQuietMSI #
###################
# MSI Installer launcher in quiet mode
#
# Inputs:
# - Stack Top -
# 0: installer executable
# 1: installer path
#
# Returns:
# - Stack Top -
# 0: installation returned code
##
Function InstallQuietMSI
Exch $R0
Exch
Exch $R1
Push $0
setOutPath "$SYSDIR"
MessageBox MB_OK 'MSI: "$R1\$R0" /quiet /norestart'
ExecWait '"$R1\$R0" /quiet /norestart' $0
MessageBox MB_OK "RC: $0"
Exch $0
Exch 2
Pop $R1
Pop $R0
FunctionEnd


At runtime, trying to install both jre_v1.5 and Acrobat Reader v7.0.9:

> Execute: "ressources\tools\Adobe\en\adobe.msi" /qb
(the returned code $0 is not set at all (contains previous value))
> Execute: "ressources\tools\JRE\jre-1_5_0_11-windows-i586-p.exe" /qb
(the returned code is 0, everything run well and install is process)


I tried to do that in a shell window (from the dir containing the setup.exe):

> C:\Documents and Settings\galevsky\Desktop\validation\"ressources\tools\Adobe\fr\adobe.msi" /quiet

and it works pretty good. The adobe.msi file (with a Data1.cab one) was picked up into INSTDIR\Setup Files\ of Acrobat Reader v7.

So, what is wrong ? Is there any strange behaviour with ExecWait ? I tried a "msiexec" /i path\adobe.msi but same behaviour happened...

Thks for your help,


Gal'

If it's a .msi then you should execute it with msiexec.exe or ExecShell.

Stu


msiexec is not better but I will try ExecShell...

Gal'


You won't be able to get an exit code with ExecShell, so you'd need to use msiexec.exe for that.

Stu


I just do:

> Execute: msiexec /i "ressources\tools\Mysql\mysql_server_v5.0.45.msi" and it fails on RC=1619 !!!

I am sure the path is good....

Gal'


Firstly it's resources and not ressources, but either way try not to use relative paths. That would be executed relative to what path is set with SetOutPath. Use a full path to be safe.

Stu


I read that this error comes from rights problem, so I decided to

> CopyFile "path\mysql_server_v5.0.45.msi" "$TEMP\mysql_server_v5.0.45.msi"
> Execute: msiexec /i "$TEMP\mysql_server_v5.0.45.msi"

... but failed also. Same error. :(

Gal'


1619 is ERROR_INSTALL_PACKAGE_OPEN_FAILED which suggests what Afrow has already said - msiexec.exe can't find the MSI file form the path you gave it.


Originally posted by Afrow UK
Firstly it's resources and not ressources, but either way try not to use relative paths. That would be executed relative to what path is set with SetOutPath. Use a full path to be safe.

Stu
Yep mixing both french and eng. I am having a try with absolute path...

Thks ;)


Gal'

Same error....


1619's text is:

# This installation package could not be opened.  Verify that
# the package exists and that you can access it, or contact
# the application vendor to verify that this is a valid
# Windows Installer package.
So if the path really is valid, it might be a corrupted MSI. Does it work when you double click it?

Oups, I made a type during the try with the absolute path: absolute path fix my problem with mysql.msi. I will now check for acrobat_reader.msi.

Gal'


Fixed !!!!!!

Many thanks, guys, the key is using absolute path.

Gal'