I’m having an issue trying to install an MSI file with some custom properties set in the command. For instance, I want to run Example.msi PROPERTY1=VALUE, PROPERTY2=VALUE.
I’m using the Execute-MSI and its calling up the MSI, but when I list the properties, it thinks its a TRANFORM. I have tried creating a transform on this particular package but have had no luck. I do have luck when I manually run msiexec /i “Example.msi” PROPERTY1=VALUE and so forth. I’m trying to get this to run in my deploy script. I tried using the -Arguments parameter, but yield no luck. Here is what I have so far:
Execute-MSI -Action Install - Path ‘NameofMSIFile.msi’ -Arguments PROPERTY=“value” PROPERT2=“value”
I figured it out by using the -AddParameters switch on the Execute-MSI function:
-AddParameters ’ PROPTERY=“VALUE” PROPERTY2=“VALUE” ’
For the sake of completion:
The issue here is that -Arguments doesnt exist for this function. We use -Parameters and -AddParameters. You used them incorrectly. -Parameters replaces the config file parameters for msi, -AddParameters appends to them.
#Since -Parameters and -AddParameters are string arrays you can specify one string like this:
Execute-MSI -Action Install -Path 'NameofMSIFile.msi' -Parameters "PROPERTY=`“value`” PROPERTY2=`“value`”"
#Or an array like this:
Execute-MSI -Action Install -Path 'NameofMSIFile.msi' -Parameters "PROPERTY=`“value`”", "PROPERTY2=`“value`”"