PSADT Execute-MSI -Parameters parsing quotes issue

What is the correct syntax in PSADT when using Execute-MSI -Paramters when the parameters has a bunch of double quotes?

  1. SCCM Install Command:
  • This is what works in SCCM as an install command
msiexec /i "AEMinimal.msi" /q INSTALLDIR="C:\Program Files (x86)\ARGUS Software" PSETUPTYPE=4 ADDDEFAULT="MainProduct,AEClient,feature.configutility,feature.exceladdin"
  1. PSADT Install:
  • This below does not work because it is having issues reading the Parameters pportion due to all the quotes not being parsed correctly
Execute-MSI -Action "Install" -Path "$dirFiles\AEMinimal_13.0.3.1830.msi" -Parameters '/q INSTALLDIR="C:\Program Files (x86)\ARGUS Software" PSETUPTYPE=4 ADDDEFAULT="MainProduct,AEClient,feature.configutility,feature.exceladdin'

I was able to self-resolve this from looking at an older thread:

Original:

msiexec /i "AEMinimal.msi" /q INSTALLDIR="C:\Program Files (x86)\ARGUS Software" PSETUPTYPE=4 ADDDEFAULT="MainProduct,AEClient,feature.configutility,feature.exceladdin"

PSADT:

  • This is what worked for me
Execute-MSI -Action "Install" -Path "$dirFiles\AEMinimal_13.0.3.1830.msi" -Parameters "/q INSTALLDIR=`"C:\Program Files (x86)\ARGUS Software`" PSETUPTYPE=`"4`" ADDDEFAULT=`"MainProduct,AEClient,feature.configutility,feature.exceladdin`""
1 Like

:white_check_mark: SOLUTION:

  • The backtick version works but I realized my actual mistake is the missing double quotes near the end of ADDDEFAULT
  1. Here is the corrected version with the missing " double quotes:
    Execute-MSI -Action "Install" -Path "$dirFiles\AEMinimal_13.0.3.1830.msi" -Parameters '/q INSTALLDIR="C:\Program Files (x86)\ARGUS Software" PSETUPTYPE=4 ADDDEFAULT="MainProduct,AEClient,feature.configutility,feature.exceladdin"'

  2. I wanted to also point out that this backtick version works as well for those in the future that stumble upon this post trying to understand how to use the backticks:
    Execute-MSI -Action "Install" -Path "$dirFiles\AEMinimal_13.0.3.1830.msi" -Parameters "/q INSTALLDIR="C:\Program Files (x86)\ARGUS Software" PSETUPTYPE="4" ADDDEFAULT="MainProduct,AEClient,feature.configutility,feature.exceladdin""

2 Likes

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