Quotation on AddParameters when Parameter also has Quotes

Hi,

I am having trouble finding the right Quotation for my line of code. It definitely works, I added it to the AppDeployToolkitConfig.xml and it used the Parameter. I tried out like 10 different quotations and none worked. I could not find any Documentation on when to use which quotes and every forum post here related to the topic uses different ones too.

This does not work for me.

Why does this not work?

Execute-MSI -Action 'Install' -Path "$dirFiles\random.msi" -AddParameters 'CODE="XXX-XX-XX-XXX"'

also tried this

“CODE="xxx-xxx-xxx-xx”"

does anyone have a documation on this topic or can help me out?

Try this:

Execute-MSI -Action 'Install' -Path "$dirFiles\random.msi" -AddParameters "CODE=`"XXX-XX-XX-XXX`" "

.
BTW:
"$dirFiles" means <contents of $dirFiles>
'$dirFiles' means $dirFiles

Sadly it does not work,

looking into the log it does not attach that Parameter at all and just installs it without and does not give an error.

Then try without forcing in the double quotes:

Execute-MSI -Action 'Install' -Path "$dirFiles\random.msi" -AddParameters "CODE=XXX-XX-XX-XXX"

Again a no… Thank you for your answers anyway so far.

Then check the MSI’s log file and/or contact the developer.

I checked the log file several times and it never gets attached because the value is always blank. I don’t see as to how this would be a developer problem when everything works fine when I manually type the parameters in Powershell or cmd. I can’t be bothered anymore with this, so I added the code to AppDeployToolkitConfig.xml now and noted it in the script if the code changes for future updates.