Excute-MSI Parameter Problem

Hi, i moving all the old stuff from Batch to the toolkit, but i have with one a problem.

in Batch i have:

msiexec /i “%~dp0Jet.Setup.ExcelAddIn_x64.msi” EXCELPLATFORM=x64 ACTIVATIONCODE=XXX-YYY-ZZZ /QN

In Powershell i tried:

Execute-MSI -Action Install -Path “Jet.Setup.ExcelAddIn_x64.msi” -Parameters “EXCELPLATFORM=x64 ACTIVATIONCODE=XXX-YYY-ZZZ /QN”

Runs into an error 1603.
I am pretty sure, that this comes through the parameters. How must it look like?

thank you

Drop the /QN

PSADT adds /Qx and other MSIEXEC.EXE parameters inside the Execute-MSI function. So it should be:

Execute-MSI -Action Install -Path "Jet.Setup.ExcelAddIn_x64.msi" -Parameters "EXCELPLATFORM=x64 ACTIVATIONCODE=XXX-YYY-ZZZ"

I think it is better to use:
Execute-MSI -Action Install -Path "$dirFiles\Jet.Setup.ExcelAddIn_x64.msi" -AddParameters "EXCELPLATFORM=x64 ACTIVATIONCODE=XXX-YYY-ZZZ"

.PARAMETER Parameters
Overrides the default parameters specified in the XML configuration file.
.PARAMETER AddParameters
Adds to the default parameters specified in the XML configuration file.

1 Like

Damn! Mito is right!

(Meanwhile I was the one who asked for the -AddParameters parameter 5+ years ago. :man_facepalming:)

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.